var slidespeed = 200;
$('.noti_user a').off().on('click',function(){
if($(this).hasClass('active')){
$(this).removeClass('active');
$('.sub_menu_closer').hide();
$('.noti_drop_down').slideUp(slidespeed);
}else{
$('.left_user_inner').children('div').children('a').removeClass('active');
$('.left_logo_part a').removeClass('active')
$('.help_drop_down,.mail_drop_down').slideUp(slidespeed)
$('.logo_drop_down').slideUp(slidespeed);
$('.noti_drop_down').slideDown(slidespeed,function(){
sScroll.refresh(); // here is error show
});
$('.sub_menu_closer').show();
$(this).addClass('active');
}
})
var sScroll; // here iscroll call
sScroll = new IScroll('.noti_outer', {scrollbars: 'custom',mouseWheel: true});
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
sScroll.refresh();
這裏是我刷新iScroll插件
,當我在IE8瀏覽器本次車展錯誤測試:無法以獲得未定義或空引用的屬性「刷新」
張貼您設置sScroll的行。這是缺少的。 –
@ axel.michel添加了sScroll行 –
您確定IScroll與ie8兼容嗎?據我所知,IScroll的誕生足以填補移動瀏覽器對溢出的支持:滾動並且不支持舊桌面瀏覽器。 –