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

General Discussion

Flexible Videos with FitVid code challenge question

In the Flexible Videos with FitVid code challenge, I keep getting the code challenge incorrect, although the video does scale in the Preview window. I copy the text "featured-video" into the container div for the new video and change "class" to "id". The video in the Preview window scales appropriately, but I continue to get "Bummer! null". If I don't change "class" to "id" the video in the Preview window does not scale.

Is the code challenge not working correctly or am I doing something wrong? I've rewatched the video a half dozen times.

-Erin

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

</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="jquery.fitvids.js"></script>
<script>
  $(document).ready(function(){
    $("#featured-video").fitVids();
  });

</script> </body>

3 Answers

Dont't change the Class to an ID, instead add an ID after the Class. It should look like something this...

<div class="some-class" id="featured-video">

Hope this helps!

Hi Erin,

I was doing the same thing. The id "featured-video" needs to be added to the div element labeled class="grid_6 omega".

Thanks Justin! I was stuck on that for a really long time.