T
Tony Hardy
Guest
Hi everyone,
Anyone who's following my Canny Creative website redesign thread will know that I'm making progress. Slow progress, but progress none the less
Yesterday I managed to create myself a responsive navigation menu. However, if you head over to my development site dev.canny-creative.com and resize the browser right down, you'll noticed that on the responsive navigation, the whole top bar is clickable.
I only want the menu icon itself to respond to the click. This is my JQuery;
<script> $(function() { var pull = $('#pull'); menu = $('nav ul'); menuHeight = menu.height(); $(pull).on('click', function(e) { e.preventDefault(); menu.slideToggle(); }); $(window).resize(function(){ var w = $(window).width(); if(w > 320 && menu.is(':hidden')) { menu.removeAttr('style'); } }); }); </script>
And the CSS and things you'd be able to get to in Firebug/Inspect Element.
I was tempted to put a hover colour on the icon background too, but maybe it's not worth it with it being for touch devices. Could anyone advise how I would do that anyway as it doesn't appear to work how I would normally try it?
Cheers,
Tony
Anyone who's following my Canny Creative website redesign thread will know that I'm making progress. Slow progress, but progress none the less
Yesterday I managed to create myself a responsive navigation menu. However, if you head over to my development site dev.canny-creative.com and resize the browser right down, you'll noticed that on the responsive navigation, the whole top bar is clickable.
I only want the menu icon itself to respond to the click. This is my JQuery;
<script> $(function() { var pull = $('#pull'); menu = $('nav ul'); menuHeight = menu.height(); $(pull).on('click', function(e) { e.preventDefault(); menu.slideToggle(); }); $(window).resize(function(){ var w = $(window).width(); if(w > 320 && menu.is(':hidden')) { menu.removeAttr('style'); } }); }); </script>
And the CSS and things you'd be able to get to in Firebug/Inspect Element.
I was tempted to put a hover colour on the icon background too, but maybe it's not worth it with it being for touch devices. Could anyone advise how I would do that anyway as it doesn't appear to work how I would normally try it?
Cheers,
Tony