|
@@ -4,7 +4,8 @@ |
|
@@ -4,7 +4,8 @@ |
4
|
* @date: 2015/11/12
|
4
|
* @date: 2015/11/12
|
5
|
*/
|
5
|
*/
|
6
|
var $ = require('jquery');
|
6
|
var $ = require('jquery');
|
7
|
-var $userAvatar = $('.user-avatar');
|
7
|
+var $userAvatar = $('.user-avatar'),
|
|
|
8
|
+ $listItem = $('.list-item');
|
8
|
var myImage = new Image();
|
9
|
var myImage = new Image();
|
9
|
|
10
|
|
10
|
require('../product/recommend-for-you.js');
|
11
|
require('../product/recommend-for-you.js');
|
|
@@ -12,3 +13,10 @@ myImage.src = $userAvatar.attr('src'); |
|
@@ -12,3 +13,10 @@ myImage.src = $userAvatar.attr('src'); |
12
|
myImage.onerror = function() {
|
13
|
myImage.onerror = function() {
|
13
|
$userAvatar.attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png');
|
14
|
$userAvatar.attr('src', 'http://static.dev.yohobuy.com/img/me/index/user-avatar.png');
|
14
|
};
|
15
|
};
|
|
|
16
|
+
|
|
|
17
|
+$('.yoho-page').on('touchstart', '.list-item, .type-item', function() {
|
|
|
18
|
+ $listItem.removeClass('highlight');
|
|
|
19
|
+ $(this).addClass('highlight');
|
|
|
20
|
+}).on('touchend touchcancel', '.list-item, .type-item', function() {
|
|
|
21
|
+ $(this).removeClass('highlight');
|
|
|
22
|
+}); |