javascript - How to unload jQuery plugins after window resize? -
i have 2 jquery plugins navigation menu, 1 smaller screens , 1 bigger screens, used code:
if (screen.width < 1024) { $(document).ready(function() { $("#my-menu").mmenu(); $("#my-button").click(function() { $("#my-menu").trigger("open.mm"); }); }); };
it works @ load page, when resize browser doesnt work, example have put browser size @ smaller 1024px, , when make bigger doesnt stop plugin , when im @ bigger 1024px loads menu plugin bigger screens, when resize browser still working, since bigger screen plugin has not fire function , works automatically.
is there way unload plugins @ window resize not while resize, when resizing it's finished (for bigger screen's menu plugin way dont load in smaller screens)?
Comments
Post a Comment