Answer the question
In order to leave comments, you need to log in
How to execute a script on screen rotation?
How to hide div block when changing screen orientation?
Let's say a person visits the site from a phone, opens the menu, rotates the screen.
You need to hide the menu when you rotate.
Tried
jQuery(window).resize(function () {
jQuery("#mainmenu").hide(0);
});
Answer the question
In order to leave comments, you need to log in
The media css property will help you more specifically the aspect-ratio parameter
$(window).on('resize',function(){$('#mainmenu').hide()});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question