|
@@ -7,12 +7,13 @@ var $ = require('jquery'), |
|
@@ -7,12 +7,13 @@ var $ = require('jquery'), |
7
|
Hammer = require('yoho.hammer'),
|
7
|
Hammer = require('yoho.hammer'),
|
8
|
tip = require('../../plugin/tip');
|
8
|
tip = require('../../plugin/tip');
|
9
|
|
9
|
|
10
|
-var likeHammer = new Hammer(document.getElementById('likeBtn'));
|
10
|
+var likeHammer = new Hammer(document.getElementById('likeBtn')),
|
11
|
addToCartHammer = new Hammer(document.getElementById('addtoCart'));
|
11
|
addToCartHammer = new Hammer(document.getElementById('addtoCart'));
|
12
|
|
12
|
|
|
|
13
|
+var productId = $('#productId').val();
|
|
|
14
|
+
|
13
|
likeHammer.on('tap', function(e) {
|
15
|
likeHammer.on('tap', function(e) {
|
14
|
- var productId = $('#productId').val(),
|
|
|
15
|
- opt,
|
16
|
+ var opt,
|
16
|
favorite;
|
17
|
favorite;
|
17
|
|
18
|
|
18
|
|
19
|
|