0
I’m trying to put a responsive menu on my site, I need that 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 look like I want when I resize the browser to a size equal to or less than 740, but then when I increase again I can’t "undo" the process, would anyone know how to help me?
Hello friend, thanks for the reply, but I already have a plugin that works, and I could for example create 2 menus to define which will appear via css. But in this case what I want is to know how I "disable" via jquery the responsive menu. Here is the problem: if (viewPortWidth <= 740) { $('Nav#menu-mobile'). mmenu(); } Else { //... how to disable??? //this is the problem }
– Leonardo Andrade
What is the plugin?
– Emir Marques
the plugin is the mmenu
– Leonardo Andrade
See the EDIT 2..
– Emir Marques
take a look here: http://mmenu.frebsite.nl/on-and-off-canvas.html
– Ivan Ferrer
even tried EDIT 2?
– Emir Marques