Case insensitive jQuery attribute selector

The simplest way to do this is to add a case insensitivity flag ‘i’ inside the regex part of the selector:

So instead of

$( "input[name*='man']")

You could do

$( "input[name*='man' i]")

JS fiddle: https://jsfiddle.net/uoxvwxd1/3/

Leave a Comment