• This project
    • Loading...
  • Sign in

fe / YOHOBUYWAP · Files

Go to a project

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Pipelines 0
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • Create a new issue
  • YOHOBUYWAP
  • static
  • js
  • shopping-cart
  • index.js
  • shopping cart
    16989a0f
    by xuqi
    2015-10-20 19:09:12 +0800  
    Browse File »
index.js 360 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/**
 * 购物车Logic
 * @author: xuqi<qi.xu@yoho.cn>
 * @date: 2015/10/20
 */

var $ = require('yoho.zepto');

require('./good');

$('.cart-nav').delegate('li', 'touchstart', function() {
    var $this = $(this);

    if ($this.hasClass('active')) {
        return;
    }

    $this.siblings('.active').removeClass('active');
    $this.addClass('active');
});