SO - 32399488

by palash

HTML

<input name="swidth" />
<input name="Widthr" />
<input name="dddWIDTH" />
<input name="widTHhhhD" />

JavaScript

$.expr[':'].nameCaseInsensitive = function (node, stackIndex, properties) {
    return node.name.toLowerCase().indexOf(properties[3]) > -1 ;
};

$('input:nameCaseInsensitive("width")').css('border', '1px solid red');