bgStretcher出错 - jQuery冲突?

时间:2011-10-15 19:42:25

标签: javascript jquery

我正在尝试实现bgStretcher jQuery插件,似乎有些冲突。我仍然是jQuery的新手,冲突仍然困扰着我。

我当前的网站在这里 - http://65.60.53.10/~purerun/

bgStretcher发出以下错误 - 未捕获TypeError:无法调用未定义的方法'split' - 但它在插件代码中。

我目前的实施如下:

jQuery(document).ready(function($){
   // other code
   jQuery('body').bgStretcher({images: ['http://65.60.53.10/~purerun/wp-content/gallery/backgrounds/26.jpg','http://65.60.53.10/~purerun/wp-content/gallery/backgrounds/img_4793.jpg'], nextSlideDelay: '10000'});
}

任何帮助都将不胜感激....

1 个答案:

答案 0 :(得分:0)

nextSlideDelay值你应该是一个不是字符串的数字;尝试删除周围的引号,如下所示:

jQuery(document).ready(function($){
   // other code
   jQuery('body').bgStretcher({images: ['http://65.60.53.10/~purerun/wp-content/gallery/backgrounds/26.jpg','http://65.60.53.10/~purerun/wp-content/gallery/backgrounds/img_4793.jpg'], nextSlideDelay: 10000});
}

我希望这有帮助!