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

Problem: Responsive Slider Plugin - Javascript Challenge 4/4

Having some problems with the last challenge in this set. The challenge requires us to :

Using jQuery select the class “wmuSlider” and call the “wmuSlider” method passing in “options”

I've tried tacking the code on to the previous part of the challenge after a semi-colon:

<script>var options = {animation: "slide", navigationControl: false}; $".wmuSlider".wmuSlider(options); </script>

And get, Oops! It looks like Task 3 is no longer passing.
So as an alternative I've tried putting it in its own script tags:

<script>var options = {animation: "slide", navigationControl: false};</script><script>$".wmuSlider".wmuSlider(options);</script>

And end up with, Bummer! You haven't called the method 'wmuSlider' on the selected 'wmuSlider' class with 'options' passed in as a parameter

Is there something I'm missing?? Help!!

What challange is this exactly? I want to take a look at it.

$".wmuSlider".wmuSlider(options); Your syntax is incorrect here that is why you are getting an error. jQuery objects need to be wrapped in parentheses like so: $(".wmuSlider").wmuSlider(options);

Thanks Andrew. I thought I was close but couldn't find the fault. Always in the details.

5 Answers

No Problem Andrew Chalkley

Could someone help me with this one as well?

I'm using <script>var options={ animation:"slide", navigationControl:false};$(".wmuSlider").wmuSlider(options); </script>

and it keeps saying "bummer! Null"

Andrew Chalkley
STAFF
Andrew Chalkley
Treehouse Guest Teacher

The code looks right.

Can we see it in the wider context? Where's it with the rest of the code?

I have the same issue: <script type="text/javascript" src="jquery.js"></script> <script type="text./javascript" src="jquery.wmuslider.js"></script> <script>var options = {animation: "slide", navigationControl: false}; $(".wmuSlider").wmuSlider(options);</script> </body>

Strange, I used a different computer and it worked! Thanks anyway!

I have the same issue:

<script type="text/javascript" src="jquery.js"></script> <script type="text./javascript" src="jquery.wmuslider.js"></script> <script>var options = {animation: "slide", navigationControl: false}; $(".wmuSlider").wmuSlider(options);</script> </body>