views:

64

answers:

1

So I recently wanted to use the jQuery to do some browser detection and noticed that the previous methods were currently deprecated as of jQuery 1.3.

They now recommend that instead of testing for a browser, test for the features of the browser. Sounds like a good idea, but I cant figure out how to actually utilize this idea.

$("p").html("This frame uses the W3C box model: <span>" +
            jQuery.support.boxModel + "</span>");

This is great and all, but how would I wrap that into something that was:

If jQuery.support.boxModel = false then

Any Ideas? Happy Holidays!

+2  A: 
if(! jQuery.support.boxModel) {
    //do stuff
}
Skilldrick
Wow. I feel stupid. Thanks!
Bruno
You'll get the hang of it!
Skilldrick