jQuery: Disable & Enable Plugin based on browser window size?
问题 I've got the following code to add a function depending on browser size, but how do I remove the effects of this plugin if the browser is resized? (Currently it only works if the page is loaded at the specific size, not if it's resized) $(document).ready(function(){ $(window).resize(function() { if ($(window).width() >= 420) { // Enable the plugin to make the tab functionality... $( "#tabs" ).tabs(); } else { // Code needed to completely disable the tab functionality?? } }); }); 回答1: I