Authored by xuqi

plus star list -> hammer

... ... @@ -5,13 +5,14 @@
*/
var $ = require('jquery'),
Hammer = require('hammer'),
lazyLoad = require('yoho.lazyload'),
Swiper = require('yoho.iswiper');
var $navs = $('#nav-tab > li'),
$contents = $('#ps-content > .content');
var mySwiper;
var mySwiper, navHammer;
lazyLoad($('img.lazy'));
... ... @@ -20,8 +21,11 @@ mySwiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination'
});
$('#nav-tab').delegate('li', 'tap', function() {
if ($(this).hasClass('focus')) {
navHammer = new Hammer(document.getElementById('nav-tab'));
navHammer.on('tap', function(e) {
var $this = $(e.target).closest('li');
if ($this.hasClass('focus')) {
return;
}
... ...