break-code.js 634 Bytes
/**
 * 断码区
 * @author: wsl<shuiling.wang@yoho.cn>
 * @date: 2016/5/20
 */

var $ = require('yoho-jquery'),
    Swiper = require('yoho-swiper'),
    ellipsis = require('yoho-mlellipsis'),
    lazyLoad = require('yoho-jquery-lazyload'),
    tip = require('../plugin/tip'),
    filter = require('../plugin/filter'),
    loading = require('../plugin/loading');

var $listNav = $('#list-nav');

new Swiper('.swiper-container', {
    slidesPerView: 'auto'
});

$listNav.on('touchstart', 'li', function() {
    $(this).addClass('bytouch');
}).on('touchend touchcancel', function() {
    $listNav.find('li').removeClass('bytouch');
});