Im having problems with Modernizr. According to the beginner tutorials i have read this html should be all there is to it, but nothing happens. What i expect is for the class of the HTML element to change to reflect what features are available and what features are not.
I have made sure the js file path is correct by adding a Alert(“Hello”); and make sure it triggers.
What is missing?
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>My Beautiful Sample Page</title>
<script src="modernizr.custom.57102.js"></script>
</head>
<body>
<div >Yo yo yo </div>
</body>
</html>
Using your example HTML from your question works fine.
Be sure that you check the current state of the page using e.g. Google Chromes developer tools or Firebug of Firefox. The “view source” option only gives you the original source code, which is exactly the same as you have written before.