Amit
Amit

Reputation: 7838

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 :)

Upvotes: 1

Views: 952

Answers (1)

Lightness Races in Orbit
Lightness Races in Orbit

Reputation: 385274

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.

Upvotes: 2

Related Questions