Opened 9 years ago
Closed 9 years ago
#15190 closed bug (notabug)
Cannot get or set custom properties
Reported by: | Evert | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.11.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
First things first, I've searched for similar tickets and yes I found the one were somebody confused props with attributes. I am not making the same mistake here.
It does work with .attr('prop', 'prop') but I don't want to add prop="prop" to the element, I just want to add prop.
Note: See
TracTickets for help on using
tickets.
I'm afraid you are, because
[…]
selectors target attributes, not properties. And only attributes recognized as boolean by the client lack a proper string value. You can, however, adopt a convention for indicating truth/falsehood and check for your expected value with[attr="<true value>"]
or[attr!="<false value>"]
, respectively.