开发者

Unrecognized jQuery function

I'm using a jQuery plugin called coin开发者_运维技巧-slider. I've followed all of the directions in the documentation regarding its installation and usage. When I look at the Firebug console, it tells me that the coinslider() function is undefined.

A link to the site is located here. The site is in a different language, so try to look past that :)


You include jQuery twice (some code removed for brevity):

<!-- load jQuery and sripts -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="http://engineercreativity.com/samples/obsession/wp-content/themes/EngineerCreativity/js/coin-slider.js"></script>
<link rel="stylesheet" href="http://engineercreativity.com/samples/obsession/wp-content/themes/EngineerCreativity/css/coin-slider-styles.css" />

<script type="text/javascript">
/* SLIDEShOW */
$(document).ready(function() {
    $('#coin-slider').coinslider();
});
</script>

<!-- later: -->

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js?ver=3.2.1'></script>

Not only is this last URL suspicious (which version did you want, again?!) but this final include overwrites the original jQuery instance (the one with coinslider added!).

Just include jQuery once, and make sure that you do it before you include the coinslider plugin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜