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
Tim Watson
4,869 PointsProblem: 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!!
Tim Watson
4,869 PointsAndrew Shook
31,709 Points$".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);
Tim Watson
4,869 PointsThanks Andrew. I thought I was close but couldn't find the fault. Always in the details.
5 Answers
Andrew Chalkley
Treehouse Guest TeacherThanks for the help Andrew Shook!
Andrew Shook
31,709 PointsNo Problem Andrew Chalkley
Taylor O'Reilly
4,830 PointsCould 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
Treehouse Guest TeacherThe code looks right.
Can we see it in the wider context? Where's it with the rest of the code?
Robert Bullen
8,022 PointsI 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>
Taylor O'Reilly
4,830 PointsStrange, I used a different computer and it worked! Thanks anyway!
Robert Bullen
8,022 PointsI 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>
Dominic E.
5,531 PointsDominic E.
5,531 PointsWhat challange is this exactly? I want to take a look at it.