2016-09-10 46 views

回答

1

在文件app /設計/前端/ {您的主題} /default/template/catalin_seo/catalog/layer/price.phtml

更換

CatalinSeoHandler.bindPriceSlider(); 

隨着

var bindPriceSliderStop = false; 
    if(window.innerWidth < 770) { 
     jQuery('body').on('click', '.block-layered-nav .block-content.accordion-open > dl > dt.current', function(){ 
      if(jQuery('.current .price-slider').length && !bindPriceSliderStop){ 
       CatalinSeoHandler.bindPriceSlider(); 
       bindPriceSliderStop = true; 
      } 
     }); 
    }else{ 
     CatalinSeoHandler.bindPriceSlider(); 
    } 

    jQuery(window).on("orientationchange",function(event){ 
     if(window.innerWidth > 770) { 
      catalinSeoHandlerMobile();    
     }else{ 
      jQuery('body').on('click', '.block-layered-nav .block-content.accordion-open > dl > dt.current', function(){ 
       if(jQuery('.current .price-slider').length){ 
        catalinSeoHandlerMobile(); 
       } 
      }); 
      if(jQuery('.current .price-slider').length){ 
       catalinSeoHandlerMobile(); 
      } 
     } 
    }); 

    function catalinSeoHandlerMobile(){ 
     CatalinSeoHandler.priceSlider.currentMinPrice = parseFloat(jQuery('#price-min-display').text()); 
     CatalinSeoHandler.priceSlider.currentMaxPrice = parseFloat(jQuery('#price-max-display').text()); 
     CatalinSeoHandler.bindPriceSlider(); 
    } 

還有一個問題,價格滑塊不支持移動觸摸事件。如果你想解決這個問題,更換標準的Magento滑塊js文件

「JS/Scriptaculous的/ slider.js」

有了這個

http://dev.amnuts.com/slider/js/slider.js

+0

我可以確認這是行得通的。謝謝! –