:empty "Matches all elements that are empty, be it elements or text." I think what your checking is value so it isn't covered by this selector.
I think you'd have to loop though them all checking the value. $(document).ready(function() { $("input[type=text]").each(function () { if ($(this).val() == '') { alert("empty text"); $(this).focus(); } }); }); On Nov 19, 10:19 am, Cyril C <[EMAIL PROTECTED]> wrote: > hi all, > > i want to select all empty tag " <input type='text' ". > I try this : > > $(document).ready(function() { > $("input[type=text]:empty").each(function (i) { > alert("vide"); > $(this).val(i); > }); > > }); > > But ALL tag " <input type='text' " are selected not ONLY the EMPTY > one. > > PLZ help.