I'm trying to put a responsive menu on my site, I need it when the screen is resized to a certain size it becomes responsive and when it increases again it goes back to the "normal" div
$(function () {
var detectViewPort = function(){
var viewPortWidth = $(window).width();
if (viewPortWidth <= 740) {
$('nav#menu-mobile').mmenu();
}
else {
//... como desabilitar???
}
};
$(function(){
detectViewPort();
});
$(window).resize(function () {
detectViewPort();
});
I can make it stay as I want it when I resize the browser to a size of 740 or less, but then when I increase again I can not undo the process, would anyone know how to help me?