You want to check if it’s an empty string instead: The spec definitely does not say that boolean attributes are not allowed to have a value. The attr() method sets or returns attributes and values of the selected elements. When this method is used to return the attribute value, it returns the value of the FIRST matched element.. The following example will select 'a' elements with a 'href' attribute of '#multiattrb' that contain a 'span' element with a class of 'ital' and turn the background colour yellow. You can find the entered value in the given input box using jQuery val(). Selects all elements that match all of the specified attribute and value filters. attribute - jquery set value jQuery, html eines ganzen Elements erhalten (4) Diese Frage hat hier bereits eine Antwort: I’ve researched a lot and get to the following working code: The above code works for a column with no dropdown box. How jQuery Add Attribute to an HTML element. When called with no arguments, .removeData() removes all values. Set the value attribute of every matched element if it is called on but if it is called on