Add a function that closes the Menu...
Hi,
I am using the following script in RSD and would like to add a function that automatically - when clicking on a category in the navigation bar in the mobile - closes/hiding the nav.bar. Is it possible to add something to this script that automatically closes/hiding the navigation bar in the mobile when clicking on a category? If anyone know, please explain exactly how.
Here is the script:
In the Head area:
<style>
@media screen and (max-width: 768px) {#menu.show {display: block;}}
</style>
In the Footer area:
<script>
$(document).ready(function() {
$(".mobil-button").click(function() {
$("#menu").slideToggle('fast', function() {
$(this).attr('style', '').toggleClass('show');
});
$(this).toggleClass('active');
});
});
</script>
I am using the following script in RSD and would like to add a function that automatically - when clicking on a category in the navigation bar in the mobile - closes/hiding the nav.bar. Is it possible to add something to this script that automatically closes/hiding the navigation bar in the mobile when clicking on a category? If anyone know, please explain exactly how.
Here is the script:
In the Head area:
<style>
@media screen and (max-width: 768px) {#menu.show {display: block;}}
</style>
In the Footer area:
<script>
$(document).ready(function() {
$(".mobil-button").click(function() {
$("#menu").slideToggle('fast', function() {
$(this).attr('style', '').toggleClass('show');
});
$(this).toggleClass('active');
});
});
</script>
Is the category link an anchor link to a spot on the same page?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Yes. It is five category links on the navigation bar and all of them are linked to anchors on the same page.
Can you share a link to the page?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Ok, here is a link to the page - it is not finished yet, but I am working on it. If you see any problem with this page, please let me know. Thanks!
http://www.energibalansering.se/test/index.html
http://www.energibalansering.se/test/index.html
Hi Gia, I just viewed it using FF web developer responsive @ 320 x 480 and it looked and worked just fine. I don't understand why you would want to auto-close the responsive menu every time someone selects a link. Back to top works just fine and allows me to select another link without needing to open the menu again.
Don
Don
Hi Don,
Thank you for your feedback, I appreciate it!
I would like to have the menu "fixed" at the top on the page so the visitor always have the menu at the top in the mobile screen when scrolling on the page. If I now, in RSD, change the settings so the menu is "fixed" at the top on the mobile screen and then opening the menu and clicking on a category, the navigation bar is going to be as a layer on the page and hide the information on the link after clicking on a category. (I have tried to do this and it was annoying to have the navigation bar as a layer on the text information on the page and that is why I would like to have an auto-close function).
/Gia
Thank you for your feedback, I appreciate it!
I would like to have the menu "fixed" at the top on the page so the visitor always have the menu at the top in the mobile screen when scrolling on the page. If I now, in RSD, change the settings so the menu is "fixed" at the top on the mobile screen and then opening the menu and clicking on a category, the navigation bar is going to be as a layer on the page and hide the information on the link after clicking on a category. (I have tried to do this and it was annoying to have the navigation bar as a layer on the text information on the page and that is why I would like to have an auto-close function).
/Gia
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.