From Here, you can download Development or Production version of Modernizr.
http://modernizr.com/ . You can also reduce the size of Modernize java script file by choosing the features you want to check in your website.
Let’s say if you only want to check for HTML5 features, you can unselect other and click on Download.
Let’s start with examples.
(1) Let’s say suppose if you want to check for HTML5 sessionStorage, localStorage, Canvas, Drag & Drop.
Modernizr works with yepnope as it provides fallback in case browser is not supporting that feature. I will explain yepnope in next tutorial. Let’s check for Canvas functionality in browser.
Here’s the code. When we include modernizr js in our html, it gives us Modernizr object to check all functionalities. Using yepnope, we can work on fallbacks also.
Let’s test it 2 different browsers Chrome 29.0 & IE 8 & check results.
Google chrome supports Canvas functionality. So It will not load flashCanvas but IE8 does not, So it falls back to flash canvas support.