I currently have the following code:
$('input[data-geo], select[data-geo]').doSomething()
Ideally I’d like to only declare the [data-geo] attribute once. Not sure if this is possible, but something along the lines of:
$('(input, select)[data-geo]')
Any ideas?
You can use the following:
Tested successfully on this fiddle:
http://jsfiddle.net/cHJ6S/
For details see the following page on the jQuery web site:
http://api.jquery.com/input-selector/