JSFiddle - React, Tailwind, and code Playground
JavaScript
try {
alert( $('[type="something"]').length );
} catch ( x ) {
alert( x.message );
}
var xmlString = '<list><item type="type-a" other="other-a"/><item type="type-b" other="other-b"/></list>',
xml = $.parseXML( xmlString );
$( "item", xml ).each(function() {
alert( ".attr(other): " + $(this).attr("other") );
// jQuery 1.10.1 in IE 7 throws SCRIPT450 (wrong number of arguments
// error in function interpolationHandler(){}
try {
alert( ".attr(type): " + $(this).attr("type") );
} catch ( x ) {
alert( ".attr(type): ERROR " + x.message );
}
});