list.js
665 Bytes
/**
* PLUS+STAR列表页
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/10
*/
var $ = require('yoho.zepto'),
lazyLoad = require('yoho.lazyload'),
Swiper = require('yoho.iswiper');
var $navs = $('#nav-tab > li'),
$contents = $('#ps-content > .content');
var mySwiper;
lazyLoad($('img.lazy'));
mySwiper = new Swiper('.swiper-container', {
lazyLoading: true,
pagination: '.swiper-pagination'
});
$('#nav-tab').delegate('li', 'touchstart', function() {
if ($(this).hasClass('focus')) {
return;
}
$navs.toggleClass('focus');
$contents.toggleClass('hide');
$(document).trigger('scroll'); //Trigger lazyLoad
});