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

"turn off the light" webpage function

Hey guys i just came across a cool little function that was on a video streaming site it was called "turn off the lights" which when clicked it blacked out all but the video screen and the turn on the lights button. so was wondering if anyone knows how to create this, as i think its quite cool and would like to know how its done.

Thanks.

2 Answers

I think its really cool to have a "turn off the lights" feature in a web page. I am not really any help in creating this effect as I have never tried it but I did find what seemed to be a good online tutorial:

http://www.jankoatwarpspeed.com/use-jquery-to-turn-off-the-lights-while-watching-videos/

Good luck!

Yer awesome thanks it's a good read il be trying that one out for sure ????