Open escoberik opened 11 years ago
Array#indexOf
is not supported in IE8 and earlier. Given that backbone relies on underscore.js, you could instead rely on _.contains()
(note the nativeIndexOf check):
$.fn.isCheckable = function() {
return _.contains(["checkbox", "radio"], this.attr("type"));
};
Otherwise, :thumbsup:
Checkable inputs need the property "checked" to be settled to true/false instead of the "value" attribute.