【发布时间】:2013-04-08 20:10:42
【问题描述】:
我有以下代码来根据浏览器大小添加功能,但是如果调整浏览器大小,如何删除此插件的效果? (目前它仅在页面以特定大小加载时才有效,而不是在调整大小时)
$(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??
}
});
});
【问题讨论】: