I don't think i used correctly. I think there are another way to do reload(after resize) and not for the whole page,but just for function. Any Tips?
$(document).ready(function(){
if (document.body.clientWidth <= 1400) {
$( window ).resize(function() {
location.reload();
});
var a=$('.myMenu ul li.has-children > a');
a.click(function() {
$(this).parent().siblings().find('ul').slideUp();
$(this).next('ul').stop(true, false, true).slideToggle()
return false;
});
} else {
$( window ).resize(function() {
location.reload();
});
$('.myMenu ul li').hover(function() {
$(this).children('ul').stop(true, false, true).slideToggle();
});
}
});