Authored by zhangxiaoru

plus明星原创

... ... @@ -29,7 +29,7 @@ $('#nav-tab').on('touchend touchcancel', function(e) {
$contents.addClass('hide');
$contents.eq($this.index()).removeClass('hide');
if (typeof $this.swiper === 'undefined') {//解决隐藏式,swiper不渲染
if (typeof $this.swiper === 'undefined') { // 解决隐藏式,swiper不渲染
$this.swiper = false;
$contents.find('li').each(function(key, item) {
$(item).find('.swiper-container').addClass('swiper-' + key);
... ... @@ -41,11 +41,11 @@ $('#nav-tab').on('touchend touchcancel', function(e) {
});
}
$(document).trigger('scroll'); //Trigger lazyLoad
$(document).trigger('scroll'); // Trigger lazyLoad
});
if ($('#nav-tab').find('li:eq(0)').hasClass('focus')) {
//解决li隐藏 swiper不渲染的问题
// 解决li隐藏 swiper不渲染的问题
$('#nav-tab').find('li:eq(0)').removeClass('focus');
$('#nav-tab').find('li:eq(0)').trigger('touchend');
}
... ... @@ -56,4 +56,4 @@ $('#nav-tab').on('touchstart', function(e) {
target.className = 'bytouch ' + target.className;
}).on('touchend touchcancel', function() {
$navs.removeClass('bytouch');
});
\ No newline at end of file
});
... ...