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

Responsive Slider Plugin: Javascript

I am on this video in the Build an Interactive Website project, but wmuSlider is not working. Watching the video, I see that PreviousNext should have been appended to the page and some other functionality added, yet neither of those things are in my page. I have checked my code over and over again multiple times to make sure it corresponds with the teacher's yet it still does not work. I even downloaded the Project Files, and it still didn't work, so I don't really know what the issue is. I'll paste my code from index.html so that maybe someone can see what I have done wrong.

<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Smells Like Bakin' Cupcake Company</title>
    <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
    <link rel="stylesheet" href="css/grid.css" type="text/css" media="screen">
    <link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
    <link href='http://fonts.googleapis.com/css?family=Nunito:400,300,700' rel='stylesheet' type='text/css'>
    <meta name="viewport" content="width=device-width, initial-scale = 1.0">
</head>

<body>

    <div class="container clearfix">
        <div id="logo" class="grid_4">

            <object data="img/logo.svg" type="image/svg+xml" class="logo">
                <!--[if lte IE 8 ]-->
                <img src="img/logo.gif" alt="Smells Like Bakin">
                <!--![endif]-->
            </object>

        </div>
        <div id="nav" class="grid_8 omega">
            <ul>
                <li class="about"><a href="#">About</a></li>
                <li class="pricing"><a href="#">Cupcakes & Prices</a></li>
                <li class="locations"><a href="#">Locations</a></li>
                <li class="contact"><a href="#">Contact Us</a></li>
            </ul>
        </div>

        <!-- Intro Images -->

        <div id="intro-slider" class="wmuSlider">
            <div class="wmuSliderWrapper">

                <article id="intro-cupcakes" class="grid_12 omega">

                    <div class="intro grid_9">
                        <h1 class="fittext">Opposites really do attract, especially in our kitchen! We combine unexpected flavors that melt together to create ironically delicious desserts. </h1>
                        <p><a href="pricing.html" class="btn">Browse Our Cupcakes</a></p>
                    </div>

                    <div class="intro-img grid_3 omega">
                        <object data="img/you-bake-me-blush.svg" type="image/svg+xml">
                            <a href="you-bake-me-blush.svg">
                                <!--[if lte IE 8 ]-->
                                <img src="img/you-bake-me-blush.gif" alt="You Bake Me Blush">
                                <!--![endif]-->
                            </a>
                        </object>
                    </div>
                </article>


                <article id="intro-locations" class="grid_12 omega">

                    <div class="intro grid_8">
                        <h1 class="fittext">We're kicking taste buds in to high gear from the west to the east coast with our featured avacodo chocolate cupcake.</h1>
                        <p><a href="locations.html" class="btn">View Our Locations</a></p>
                    </div>

                    <div class="intro-img grid_4 omega">
                        <object data="img/love-at-first-bite.svg" type="image/svg+xml">
                            <a href="love-at-first-bite.svg">
                                <!--[if lte IE 8 ]-->
                                <img src="img/love-at-first-bite.gif" alt="Love at First Bite">
                                <!--![endif]-->
                            </a>
                        </object>
                    </div>
                </article>
            </div>
        </div>

        <!-- End Intro Images -->
        <div id="featured-cupcake" class="grid_7">
            <h2>Cupcake of the Week</h2>
            <p>This week’s featured cupcake is the <a href="#">Avocado Chocolate cupcake</a>. It’s flavors will kick your taste buds into fiesta mode!</p>

            <div id="featured-video">
                <iframe src="http://player.vimeo.com/video/50610288?title=0&amp;byline=0&amp;portrait=0" width="400" height="275" frameborder="0"></iframe>
            </div>

        </div>

        <div id="new-cupcakes" class="grid_5 omega">
            <h2>Fresh Out the Oven</h2>
            <p>Our newest cupcakes are <a href="#">Bacon Me Crazy</a> and <a href="#">Jalapeño So Spicy</a>. </p>

            <div data-picture data-alt="Bacon Me Crazy">
                <div data-src="external/imgs/bacon-small.jpg"></div>
                <div data-src="external/imgs/bacon-medium.jpg"     data-media="(min-width: 400px)"></div>
                <div data-src="external/imgs/bacon-large.jpg"      data-media="(min-width: 800px)"></div>
                <div data-src="external/imgs/bacon-extralarge.jpg" data-media="(min-width: 1000px)"></div>
                <!-- Fallback content for non-JS browsers. Same img src as the initial, unqualified source element. -->
                <noscript>
                    <img src="external/imgs/bacon-small.jpg" alt="Bacon Me Crazy">
                </noscript>
            </div>


            <div data-picture data-alt="Spicy Lime">
                <div data-src="external/imgs/lime-small.jpg"></div>
                <div data-src="external/imgs/lime-medium.jpg"     data-media="(min-width: 400px)"></div>
                <div data-src="external/imgs/lime-large.jpg"      data-media="(min-width: 800px)"></div>
                <div data-src="external/imgs/lime-extralarge.jpg" data-media="(min-width: 1000px)"></div>
                <!-- Fallback content for non-JS browsers. Same img src as the initial, unqualified source element. -->
                <noscript>
                    <img src="external/imgs/lime-small.jpg" alt="Spicy Lime">
                </noscript>
            </div>

        </div>

        <div id="about" class="grid_7">
            <h2>Inside the Kitchen</h2>
            <p>Smells Like Bakin’ started out in the garage of the husband wife duo Allison &amp; Joseph. Allison is the baker, and Joseph found a way for them to make a business out of her tasty treats. Flash forward to today and they have a successful store front, catering business and cupcake truck. </p>
            <p><a href="#" class="btn-small">Read More</a></p>
        </div>


        <div class="grid_5 omega">
            <h2>Get Bakin’ with Us</h2>

            <div id="contact">
                <p>Call us: <span>1-800-CUP-CAKE</span><br>
                    Email us: <a href="#">bakeon@smellslikebakin.com</a></p>
                </div>

                <p>We announce all of our new flavors first through Facebook &amp; Twitter, and even take requests!</p>     

                <object data="img/facebook.svg" type="image/svg+xml">
                    <a href="facebook.svg">
                        <!--[if lte IE 8 ]-->
                        <img src="img/facebook.gif" alt="Facebook">
                        <!--![endif]-->
                    </a>
                </object>

                <object data="img/twitter.svg" type="image/svg+xml">
                    <!--[if lte IE 8 ]-->
                    <img src="img/twitter.gif" alt="Twitter">
                    <!--![endif]-->
                </object>
            </div>

            <div id="copyright" class="grid_12">
                <p>© 2012 Smells Like Bakin' Cupcake Company. All Rights Reserved.</p>
            </div>

        </div>

        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" src="js/jquery.wmuslider."></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 type="text/javascript">
          $("#featured-video").fitVids();
          $(".fittext").fitText(2.2);
          $(".wmuSlider").wmuSlider;            
            </script>
  </body>
  </html>

3 Answers

Ian Svoboda
Ian Svoboda
16,639 Points

This slider's code is pretty awful. Kind of a shame they chose this among a myriad of superior options. ANYWAYS....

The problem here appears to be your function argument for navigationControl

Try changing:

    navigationControl: false,

to:

    navigationControl: true,

So would you recommend not wasting my time struggling to figure this out and just watch the videos and learn the section without testing my own code?

Also, it was failing prior to when I typed that line of code in. I just reverted the code above to the state in which it began failing in the first place.

Ian Svoboda
Ian Svoboda
16,639 Points

Well, the problem with that slider is that its designed for HTML5 compatibility and would be harder to work with if the site visitor is using an older browser. If you're experimenting for your own purposes, try these two instead:

Nivo Slider

FlexSlider