1

For example searching

$('[name=whatever]')

should find

 $('[name=whatever]') and  $('[name=WhaTevEr]')

Thanks ;)

Somebody
  • 9,316
  • 26
  • 94
  • 142

2 Answers2

6

Any possible solution is going to be really inefficient, because it cannot work with the browser's native selector engine. It would be better to use a class to identify the elements.

However, if you're insistent on this approach, you can use filter():

$('[name]').filter(function () {
    return this.name.toLowerCase() == "whatever";
});
Andy E
  • 338,112
  • 86
  • 474
  • 445
0

Not directly, but you can have a regex as selector

Take a look at this topic:

jQuery selector regular expressions

Community
  • 1
  • 1
Ortiga
  • 8,455
  • 5
  • 42
  • 71