0
当宽度为特定大小时,当前尝试删除jScrollPane。这似乎是工作,我可以触发警报与jscrollPane destroy();和modernizr
if (Modernizr.mq("screen and (max-width:715px)")) {
alert('hello world');
}
而且我可以点击功能
$('.st-accordion a').click(function() {
var element = $('.hs-content').jScrollPane({});
var api = element.data('jsp');
api.destroy();
});
删除JScrollPane的,但不管是什么原因,我不能触发的destroy();与modernizr条件
if (Modernizr.mq("screen and (max-width:715px)")) {
var element = $('.hs-content').jScrollPane({});
var api = element.data('jsp');
api.destroy();
}
任何想法?