Authored by lore-w

商品列表页增加下拉效果

@@ -85,9 +85,6 @@ module.exports = function($o, rowWidth) { @@ -85,9 +85,6 @@ module.exports = function($o, rowWidth) {
85 offsetL = $target.offset().left; 85 offsetL = $target.offset().left;
86 offsetR = winW - (offsetL + targetWidth); 86 offsetR = winW - (offsetL + targetWidth);
87 87
88 -  
89 - console.log($target.offset().left);  
90 -  
91 pMouseHover.fire({ 88 pMouseHover.fire({
92 type: 'MouseEnter', 89 type: 'MouseEnter',
93 target: $target, 90 target: $target,
@@ -137,9 +137,10 @@ exports.init = function(num) { @@ -137,9 +137,10 @@ exports.init = function(num) {
137 // 左侧导航 137 // 左侧导航
138 $productListNav.click(function() { 138 $productListNav.click(function() {
139 if ($(this).hasClass('active')) { 139 if ($(this).hasClass('active')) {
140 - $(this).removeClass('active'); 140 + $(this).find('.sort-child-list').stop(true, true).slideUp();
141 } else { 141 } else {
142 - $(this).addClass('active'); 142 + $(this).find('.sort-child-list').stop(true, true).slideDown();
143 } 143 }
  144 + $(this).toggleClass('active');
144 }); 145 });
145 }; 146 };
@@ -61,9 +61,9 @@ @@ -61,9 +61,9 @@
61 } 61 }
62 } 62 }
63 } 63 }
64 - ul.sort-child-list { 64 + /*ul.sort-child-list {
65 display: block; 65 display: block;
66 - } 66 + }*/
67 } 67 }
68 } 68 }
69 69