jacinta
jacinta

Reputation: 45

JavaScript functions browser compatibility

How can I check which functions of JavaScript the browser support which I am using? It can be any browser.

Upvotes: 0

Views: 192

Answers (2)

D'Arcy Rittich
D'Arcy Rittich

Reputation: 171559

You don't :)

The whole point of using a Javascript library like jQquery is to avoid the necessity for doing this. They provide an abstraction layer that hides the specific implementation of Javascript across browsers, as well as providing many methods allowing you to use much less code than you would to do the same thing in standard Javascript.

Upvotes: 2

Nick Craver
Nick Craver

Reputation: 630597

This is what jQuery.support is for :) $.support provides a feature list, that different browsers may or may not support, and if you're using something that is inconsistent, this will help.

$.browser was the old way, which tells you which browser you're on, but don't use this to detect features. By using $.browser and saying, well this is IE8 it can't do that...that may change via an update tomorrow, that's why feature detection is a much better way to go, which $.support assists with.

Upvotes: 4

Related Questions