Question

I am working on a JQM mobile website, and i am requaired to add support for IE8 and under using modernizr, in my project i use features like geolocation, canvas, localStorage, html5 forms and css3 design, i am trying to use webshims, which, to my understanding, support all this features but i must have missed somthing when reading the documentation because i dont think its working very well (tried the IE developer tools emulator to test it but nothing happned), here is the top of my html code:

 <!DOCTYPE html>
<html clas="no-js">
<head>
      <title>Ziv's car rental</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" /> 
   <script src="scripts/modernizr.custom.75297.js"></script>   
<script src="scripts/polyfiller.js"></script>
<script type="text/javascript">

$(document).ready(function(){   
    $.webshims.polyfill()
});

</script>

the "polyfiller.js" is the js file that came with the webshims, what am i missing?

Was it helpful?

Solution

Modernizr doesn't necessarily do anything besides feature detection. For example, if you wanted to do a check in javascript for, lets say css transition support, you would do something like this:

if (Modernizr.csstransitions) {
  // Do modern things
} else {
  // Do old things
}

As for the classes it adds to the HTML element, that is up to you how to use them via stylesheets.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top