If someone can help me please?
I have coded a responsive layout, in big screen is one type of menu, in small another. here is the jquery code:
if($(window).width() < 480){
$('.menu_items').fadeOut(0);
$('.menu-bar').click(function(){
$('menu_items').fadeToggle(500 , "swing");
});
$('.menu_item').click(function() {
$('menu-bar');
});
} else {
$('.menu_items').fadeOut(0);
$('.menu-bar').hover(function(){
$(this).children().fadeIn(100, "swing");
},function(){
$(this).children().fadeOut(400, "swing");
}).triger('mouseleave');
};
this work fine! In screen size 480x320 resolution and below is active the first one function, resolution bigger then 480px is active the second one.
Here is the problem: when I resize the window beyond the braking point (480px) there is still active the first function when I've load the html.
I must reload the page to make the the right function active.