Prestashop不使用我的JS代码

时间:2014-04-16 11:36:59

标签: jquery prestashop

在Prestashop 1.5.x中我的滑块不起作用。但是在一个简单的HTML页面中它可以工作。

我发现问题出在这个Jquery代码中:

       $(document).ready(function(){
            $('#demo1').skdslider ({delay:5000, animationSpeed: 2000,showNextPrev:true,showPlayButton:true,autoSlide:true,animationType:'fading'});

            $('#responsive').change(function(){
              $('#responsive_wrapper').width($(this).val());
            });

        });

当我将此代码放在我的页面上时,刷新页面后它会变为白色。如果我删除它,页面就会打开。

问题在于:

$('#demo1').skdslider ({delay:5000, animationSpeed: 2000,showNextPrev:true,showPlayButton:true,autoSlide:true,animationType:'fading'});

为什么prestashop不喜欢它?有什么我可以改变才能让它发挥作用吗?

谢谢!

1 个答案:

答案 0 :(得分:0)

我想你忘记了引号。你应该试试这个:

$('#demo1').skdslider ({'delay':5000,'animationSpeed': 2000,'showNextPrev':true,'showPlayButton':true,'autoSlide':true,'animationType':'fading'});