You are viewing our Forum Archives. To view or take place in current topics click here.
Mobile Responsive Nav
Posted:
Mobile Responsive NavPosted:
Status: Offline
Joined: Aug 22, 201014Year Member
Posts: 3,110
Reputation Power: 171
Status: Offline
Joined: Aug 22, 201014Year Member
Posts: 3,110
Reputation Power: 171
Hi guys I'm trying to learn responsive website development I've got the basics down, but I'm trying to do a mobile navigation using Jquery.
Here is the code using JQuery
$(function(){
$('nav a#toggle').click(function() {
$('ul').slideToggle(200, function() {
// Animation complete.
});
});
});
This works, however when I toggle it, and resize the window, the links for desktop are no longer there. I was thinking of adding something like when the window is resized to a specific size for example 1024px then toggle the menu back. Not sure of how to go about doing this really. Any help would be appreciated.
Here is the code using JQuery
$(function(){
$('nav a#toggle').click(function() {
$('ul').slideToggle(200, function() {
// Animation complete.
});
});
});
This works, however when I toggle it, and resize the window, the links for desktop are no longer there. I was thinking of adding something like when the window is resized to a specific size for example 1024px then toggle the menu back. Not sure of how to go about doing this really. Any help would be appreciated.
You are viewing our Forum Archives. To view or take place in current topics click here.