I need to find all the elements with the class incorrect , when I have this object of one of the input in the table (no matter what), then I have to run through and count the number of these fields, if the text is unique, I delete the class.
I have a typeahead class for all selections typeahead
function ValidProduct(Obj,Metka){ var Input = $(Obj); console.log("--",Input.closest('tbody').find('input.typeahead.incorrect').length); Input.closest('tbody').find('input.typeahead.incorrect').each(function(){ console.log(this); }); } And it turns out that this function object is not taken into account in the traversal. What's wrong?