A truthy/falsey check will behave the same in both IE and Chrome, but if you try to make an equality match on the value you'll get different things for the falsey circumstance. Consider x here:
var x = $('#Whatever').attr("style");
It will match to "" in most browsers and yet match to undefined in IE. This means you can't do...
var y = x.indexOf('whatever');
...to fish for something in x without a sanity check to make sure x is truthy first.
No comments:
Post a Comment