我有一个问题与https://www.magentocommerce.com/magento-connect/layered-navigation-seo.html。价格滑块不能在移动设备上工作。请帮助!
文件app/design/frontend/{your-theme}/default/template/catalin_seo/catalog/layer/price. php
代替 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