...
|
...
|
@@ -9,7 +9,6 @@ var $allProductCell = $('.allproduct'), |
|
|
$categoryContainer = $('.category-container'),
|
|
|
$contents = $categoryContainer.children('.content'),
|
|
|
$subLevelItem = $categoryContainer.find('.sub-level li'),
|
|
|
$primaryItem = $categoryContainer.find('.primary-level li'),
|
|
|
$trilangle = $categoryContainer.find('.primary-level-trilangle');
|
|
|
|
|
|
//初始化container高度
|
...
|
...
|
@@ -53,16 +52,15 @@ $categoryContainer.on('touchend', function(e) { |
|
|
}
|
|
|
});
|
|
|
|
|
|
$categoryContainer.find('.primary-level').on('touchstart touchend touchcancel', 'li', function() {
|
|
|
$primaryItem.removeClass('highlight');
|
|
|
$categoryContainer.find('.sub-level').on('touchstart', 'li', function() {
|
|
|
$subLevelItem.removeClass('highlight');
|
|
|
$(this).addClass('highlight');
|
|
|
}).on('touchend touchcancel', 'li', function() {
|
|
|
$(this).removeClass('highlight');
|
|
|
});
|
|
|
|
|
|
$categoryContainer.find('.sub-level').on('touchstart', 'li', function() {
|
|
|
$subLevelItem.removeClass('highlight');
|
|
|
$allProductCell.on('touchstart', function() {
|
|
|
$(this).addClass('highlight');
|
|
|
}).on('touchend touchcancel', 'li', function() {
|
|
|
}).on('touchend touchcancel', function() {
|
|
|
$(this).removeClass('highlight');
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|