Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Build an Interactive Website > jQuery Plugins > Responsive Slider Plugin - JavaScript

The video: http://teamtreehouse.com/library/websites/build-an-interactive-website/jquery-plugins/responsive-slider-plugin-javascript

Hello All,

This video gives instructions for how to integrate the jQuery plugin "wmuSlider" to the Smells Like Bakin website. By the end of the video, we are supposed to have some evidence of the slider on our page. Nothing has shown up for me. Here is a screenshot: http://i49.tinypic.com/fumg6w.jpg

Here is what we are supposed to do.

After downloading the source from Github: 1) Place the file "jquery.wmuSlider.min.js" into the "js" folder. 2) Link to the script in the code. 3) Call it.

Here is my code:

//HTML

//The class "wmuSlider" is applied
<div id="intro-slider" class="wmuSlider">
    <div class="wmuSliderWrapper">
        <article id="intro-cupcakes" class="grid_12 omega">
...

//Scripts

<script src="js/jquery.js"></script>

//Link to the file. Double-checked: it is in there. Copied and pasted the name.
<script type="text/javascript" src="js/jquery.wmuSlider.min.js"></script>

<script src="external/matchmedia.js"></script>
<script src="picturefill.js"></script>
<script src="jquery.fitvids.js"></script>
<script src="jquery.fittext.js"></script>

<script>
      $("#featured-video").fitVids();
      $(".fittext").fitText(2.2);

      // Call the plugin. 
      $(".wmuSlider").wmuSlider;

</script>

</body>
</html>

After refreshing, no evidence of the slider shows up on my page. What am I doing wrong?

Thanks in advance.

3 Answers

Funny how reading the code on the forum makes life clearer. I found my mistake.

The code $(".wmuSlider").wmuSlider;

is supposed to be $(".wmuSlider").wmuSlider();

Andrew Chalkley
STAFF
Andrew Chalkley
Treehouse Guest Teacher

Yey!

Sometimes a fresh look at the problem really helps.

lol