I have a multi-level mega menu on my site (using jquery plugin), however, when the site is being viewed on a mobile device, I want to run different JS code on the menu, in order to have a mobile friendly select menu. What is the correct way for me to check which code to run, something like if screen width less than 768px wide? Is there a standard way of dealing with this?
Share
check the
window.screenobject.