Sunil Chaudhry Sunil Chaudhry - 1 year ago 135
jQuery Question

how to find first input/select in jquery

I used the following line to do so, but it fails when a select comes on the form. It lefts select and then it stops working even for inputs.

var $ele = $("select,input[type='text'],input[type='password']:visible[required]").filter(function ()
{ return this.value.trim() == '' || this.value.trim().indexOf('--') != -1 ;

Answer Source

You may looking for below code.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download