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

Disabling a jQuery Lightbox with Media Queries?

I've created a lightbox for a mock website, a la the one Mr. Chalkley walks us through in his excellent jQuery tutorials. I'm now writing media queries for a mobile version of the site. I want to disable the lightbox for the mobile version. Because this happens.

It might be simpler not to have it altogether when someone logs on on an iPhone. How would I go about this using media queries? Or would I need to do something in JavaScript?

Thx ~Jay

1 Answer

Petros Sordinas
Petros Sordinas
16,181 Points

Have you tried display: none; in the media query for the lightbox class?

This just occurred to me literally an hour ago. Of course that would work. I could even alter the lightbox classes properties to make it fit the mobile device.

Complete fail. On the upside you get the Best Answer.