responsive-nav.js instead for a navigation for a div #177

Open
Basti10 opened this Issue Jul 13, 2015 · 7 comments

Projects

None yet

3 participants

@Basti10
Basti10 commented Jul 13, 2015

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?

@Aybee
Aybee commented Jul 13, 2015

Simply use CSS media queries to achieve this. https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries

@Basti10
Basti10 commented Jul 14, 2015

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.

@samikeijonen

Yes you can do that exactly the same way as it would be nav element.

@Aybee
Aybee commented Jul 14, 2015

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.

@Basti10
Basti10 commented Jul 15, 2015

Many thanks for your responses!
I'll try to understand the script. I do not know much about javascript
Have a nice day

@Basti10
Basti10 commented Jul 27, 2015

Unfortunately I am not able to solve my problem. can someone help me?

@Basti10
Basti10 commented Aug 9, 2015

PLEASE HELP ME

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment