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

Mark Prather
Mark Prather
16,454 Points

Jquery Plugins in Media Queries

Hypothetically:

If I design mobile first and wrap my code in a container class, not wanting to have my mobile viewers slowed down by downloading the jQuery libraries, could I just call them in an ::after pseudo class in the media query?

example: "@media screen and (min width:700px){ content-wrapper::after{ content:"<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>" } }"

Would this improve the speed at all? Would this not actually call the libraries that I want it to? Would this open a worm hole to a dimension where flamingos rule us all have learned to put their other foot down?

Just a thought