...
|
...
|
@@ -9,10 +9,10 @@ var $ = require('jquery'), |
|
|
|
|
|
var $nav = $('.category-nav'),
|
|
|
$categoryContainer = $('.category-container'),
|
|
|
$contents = $categoryContainer.children('.content');
|
|
|
$contents = $categoryContainer.children('.content'),
|
|
|
$subLevelItem = $('.sub-level li');
|
|
|
|
|
|
var $curContent = $contents.not('.hide'),
|
|
|
$curClickSubLevel;
|
|
|
var $curContent = $contents.not('.hide');
|
|
|
|
|
|
var navHammer, ccHammer;
|
|
|
|
...
|
...
|
@@ -71,13 +71,9 @@ ccHammer.on('tap', function(e) { |
|
|
}
|
|
|
});
|
|
|
|
|
|
$('.sub-level').bind('touchend', function(e) {
|
|
|
var $cur = $(e.target);
|
|
|
|
|
|
$cur.addClass('a-highlight');
|
|
|
|
|
|
if ($curClickSubLevel) {
|
|
|
$curClickSubLevel.removeClass('a-highlight');
|
|
|
}
|
|
|
$curClickSubLevel = $cur;
|
|
|
}); |
|
|
\ No newline at end of file |
|
|
$subLevelItem.on('touchstart', function() {
|
|
|
$subLevelItem.removeClass('highlight');
|
|
|
$(this).addClass('highlight');
|
|
|
}).on('touchend touchcancel', function() {
|
|
|
$(this).removeClass('highlight');
|
|
|
}); |
...
|
...
|
|