May 2011
Beginner
400 pages
10h 48m
English
Modernizr is an open source JavaScript library that allows us to test for individual features of HTML5 in our users’ browsers. Instead of testing just for a particular browser and trying to make decisions based on that, Modernizr allows us to ask specific questions like: “Does this browser support geolocation?” and receive a clear “yes” or “no” answer.
The first step to using Modernizr is to download it from the Modernizr site, at http://modernizr.com.
Once you have a copy of the script, you’ll need to include the script
file in your pages. We’ll add it to the head in this example:
<!doctype html> <html> <head> <meta charset="utf-8"> <title>My Beautiful Sample Page</title> <script src="modernizr-1.7.min.js"></script> </head> ...
Read now
Unlock full access