Home › Forums › JavaScript › Mobile Horizontal Navigation
- This topic is empty.
-
AuthorPosts
-
February 1, 2015 at 7:19 am #194821analisParticipant
This is my project a navigation menu.
It runs on the desktop , but for devices with touch screen does not work , when I click on the link disappears .
I do not think that with only css you can make it work .
you can arrange with pure javascript ?
February 1, 2015 at 8:04 am #194826Paulie_DMemberyou can arrange with pure javascript ?
Hi.
CSS-Tricks is not a code writing service. We love to help you figure out where your code isn’t working the way it should.
If you can show us what you have tried we can help you out but we’re generally not going to write it for you.
If someone here is generous enough to write something you won’t understand why it works or what it’s actually doing and you won’t learn anything.
If you don’t want to learn, that’s OK, but you should hire someone to do it for you.
In the meantime, this subject has come up recently in other threads..you might try looking through those.
Alternatively, try using a CSS framework like Bootstrap that will do a lot of this for you.
February 1, 2015 at 9:21 am #194828analisParticipanthi
it is not an argument easy.
I read books , but there is very little.
know a bit of javascript but do not know where to start
February 1, 2015 at 10:32 am #194829ShikkedielParticipantThe main issue is in this bit :
#nh ul, #nh:active ul { list-style:none; display:none; float:left; margin-top:0px; margin-right:5px; }
Remove the
#nh:active ul
and it should work fine. Right now it hides the links when you click it (:active
). Shouldn’t need a special JavaScript approach, clicks work on mobile as well.Edit – apart from hover on the icon of course…
$('#icon').click(function() {$('#nh ul').toggle()});
Don’t mind I’m using jQuery here (needs a link to the library).
Here’s a pure JavaScript alternative :February 1, 2015 at 12:10 pm #194832analisParticipantthanks
works perfectly on Android!
I can not test on ios.
I thought of having to use force to javascript , however you do not need , so I can keep the pages lighter .
WOW
February 1, 2015 at 12:33 pm #194835ShikkedielParticipantCould well be Android simulates the hover event when the item is clicked. But I think on iStuff a bit of JavaScript is still needed.
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.