I am trying to check if a method exists .prop()in the current jQuery (to ensure compatibility) with:
if(typeof $.prop === 'function')
I would expect the condition to be higher truefor jQuery >= 1.6and falsefor jQuery < 1.6, as I can understand from the docs
In any case, testing this parameter with jsfiddle results in:
typeof $.prop === 'function':
truewhen jQuery >= 1.6falsewhen jQuery < 1.6 and jQuery > 1.3truewhen jQuery <= 1.3
here is a very simple script that provides the results above (just switch the jQuery version to see what I described).
When I try to use this .prop()with jQuery ie 1.3, I get an error .prop is not a function. The same problem is also tested outside of jsfiddle. Is this behavior normal? How can I check if there is .prop()?
thank