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 trialDarrin Rich
3,119 PointsCode Challenge: Flexible videos with FitVid
I'm currently stuck on this code challenge. Question is: Using the unique ID defined within the fitvid script, add the appropriate code to the div that contains the embedded video so it scales with the fluid layout.
I thought I did it correctly. In preview the video adjust as it should but Im still getting the message that I didn't do it correctly.
Here is what I did
<body>
<div class="container">
<div class="grid_6 omega">
<div id="featured-video">
<iframe src="http://player.vimeo.com/video/50610288?title=0&byline=0&portrait=0" width="400" height="225" frameborder="0"></iframe>
</div>
</div>
</div>
6 Answers
Darrin Rich
3,119 PointsThe js is as follows
<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>
Scott Paterson
26,869 PointsDid you find a solution to this? I am in the same position not good.
Darrin Rich
3,119 PointsNo I haven't. Not sure If I'm doing it incorrectly or just a bug in the test.
Scott Paterson
26,869 Points<div id="featured-video" class="grid_6 omega">
I managed to get it buy doing this adding the id to class grid 6 and worked for me.
Maybe bit fussy on code
Darrin Rich
3,119 Points@Scott Thanks man. That did it. I can finally move forward.
For future readers:
I also ran into this issue.
Simply putting
<div id="featured-video">
~~~~~~
</div>
as the video states does not work.
Add: id="featured-video" to the Div already in place