Use Modernizr JavaScript


show more Learn how to incorporate Modernizr, an open-source JavaScript library, to detect whether HTML5 and CSS3 features in your code are supported. show less
please wait ...

Using Modernizr

This is web development, so we'll be working with browsers with different feature sets for a long time to come. And though we can rank most ECMAScript 3 without caring much about browser differences, if you're going to be an early adopter of HTML5 features, it really does become an issue, and there's a great library you should take a look at that will help you build those HTML5-focused apps while staying aware of backwards compatibility. It's called Modernizr. It allows you to do easy feature detection of both HTML5 and CSS3 features.

Kind of like working with JQuery or any other library, you can simply download a copy it from modernizr.com and link to it on your web page. Now it's suggested that you actually put this file linked to in the head of your document, as the code here needs to run immediately, actually before the body tag loads. It's very lightweight, so that shouldn't be an issue. Now as soon as it runs, what you'll have is a new JavaScript ob...

Using Modernizr
Video duration: 3m 2s 5h 31m Beginner

Viewers:

Learn how to incorporate Modernizr, an open-source JavaScript library, to detect whether HTML5 and CSS3 features in your code are supported.

Subjects:
Developer Web
Software:
JavaScript
Author:
please wait ...