responsive-nav.js
responsive-nav.js copied to clipboard
responsive-nav.js instead for a navigation for a div
hello how can I use your responsive-nav.js to hide a div on mobile devices?
The navigation is visible on large screens and the navigation is not visible on small screens. The toggle button is visible on small screens and the navigation will be displayed after clicking on the button. This is your example.
I would like to use your script, but instead for a navigation for a div. Is this possible?
Simply use CSS media queries to achieve this. https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries
I think because of my bad English You do not understand what I mean.
I try again: I have a div (ID infobox). On small devices these div should be hidden. And a button should be displayed. The div infobox should appear after clicking on the button.
Yes you can do that exactly the same way as it would be nav element.
Ah, ok I see. If you're not using responsive-nav.js you should not run responsive-nav.js to manage that. It's easier by changing/adding/removing a class after a click event. You will get help on stackoverflow.com.
If you run responsive-nav.js maybe you could use the functions addClass() https://github.com/viljamis/responsive-nav.js/blob/master/responsive-nav.js#L145-L156 and removeClass() https://github.com/viljamis/responsive-nav.js/blob/master/responsive-nav.js#L158-L167
Maybe viljamis can give an example how to use them.
Many thanks for your responses! I'll try to understand the script. I do not know much about javascript Have a nice day
Unfortunately I am not able to solve my problem. can someone help me?
PLEASE HELP ME