How can I find out if an input field is anything other than a select ?
I tried with if($(el).not("select")) and I get the selects too...
if(!$(el).is("select")) {
// the input field is not a select
}
The .not() method returns a new jQuery object with everything from the original object that doesn't match the selector.
You can't just use it in an if statement like that.
Instead, you use the .is method, which checks whether the element matches a selector and returns a boolean.
if (!$(el).is('select'))