Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 ????