jQuery Browser Detection

By gilbitron in Javascript on 19/02/2009 at 08:32

Views: 1356
Tagged: jquery
URL: http://docs.jquery.com/Utilities/jQuery.browser

Starter:

Note: This code is deprecated as of jQuery 1.3 (see jQuery.support instead).

Available flags are: safari, opera, msie and mozilla

Main Course:

jQuery.each(jQuery.browser, function(i) {
  if($.browser.msie){
     $("#div ul li").css("display","inline");
  }else{
     $("#div ul li").css("display","inline-table");
  }
});
 

Expand Report Code | Install Coda Clip

Please log in to vote.

Compliments to the Chef

No comments yet...

How was your Meal?


  • Allowed HTML: <b><strong><u><i><em><a>

  • Why ask? It helps us stop spam comments.