javascript - show a div with jQuery if the user is on IE 9 and below -


how detect (with jquery) if user on ie 9 or below, , if .show() div?

i have done below jquery android. how ie 9 , below condition?

done similar android. (would similar solution ie 9 and below)

var ua = navigator.useragent.tolowercase(); var isandroid = ua.indexof("android") > -1; //&& ua.indexof("mobile"); if(isandroid) {     // alert( "welcome" );     $("#android").slidedown(); } 

have tried use method of detecting if you're using ie?

if ($.browser.msie  && parseint($.browser.version, 10) > 8)     console.log('using ie9/10');  else              console.log('not ie9/10'); 

another way of doing because $.browser deprecated:

checkieversion();    /**   * returns version of internet explorer or -1   * (indicating use of browser).   */  function getieversion()  {      var returnvalue = -1; // return value assumes failure.        if (navigator.appname == 'microsoft internet explorer')      {          var useragentvalue = navigator.useragent;          var regexpvalue  = new regexp("msie ([0-9]{1,}[\.0-9]{0,})");          if (regexpvalue.exec(useragentvalue) != null)              returnvalue = parsefloat( regexp.$1 );      }        return returnvalue;  }    function checkieversion()  {      var returnmessage = "you're not using internet explorer.";      var ieversion = getieversion();        if ( ieversion > -1 )      {          if ( ieversion >= 9.0 )               returnmessage = "you're using recent copy of internet explorer."          else              returnmessage = "you should upgrade copy of internet explorer.";      }        console.log( returnmessage );  }


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -