SPlatten SPlatten - 5 months ago 17x
Javascript Question

jquery filter on tag type and id

I would like to select all inputs excluding specific inputs by ID, the filter I have at the moment works for selecting all inputs that are not checkboxes or buttons, but I want to also exclude inputs with certain id's but how?

Current filter:

objInputs = $("INPUT:NOT(:CHECKBOX,:BUTTON)");


You can use add the ID selector in :not() selector to exclude them

objInputs = $("input:not(:checkbox,:button,#SomeID)")