From the course: CSS: Advanced Typographic Techniques

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Conditional resource loading

Conditional resource loading - jQuery Tutorial

From the course: CSS: Advanced Typographic Techniques

Start my 1-month free trial

Conditional resource loading

Often it doesn't really make sense to load resources if the device or user agent doesn't support that particular functionality. The web fonts certainly fall into that category. If the device doesn't support them it doesn't really make a whole lot of sense to force the user agent to download all of those fonts. So, let's take a look at how we can use Modernizer to make sure that only the resources that you need are loaded. So we're picking up right where we left off in the last exercise. This time working on the poster file from the 06_06 directory. So I'm going to go right back into our loader object. Now it's important to remember where we are. Remember this one right here is loading up our Jquery library and this one, the one underneath it, is loading up lettering and then when lettering is finished, it's running a function that applies lettering js to the element on the page that we want. Okay so we need another one in order to do conditional resource loading. So after the closing…

Contents