Bug Tracker

Changes between Initial Version and Version 1 of Ticket #15190, comment 1


Ignore:
Timestamp:
Jul 21, 2014, 2:21:46 PM (9 years ago)
Author:
gibson042
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15190, comment 1

    initial v1  
    11> I found the one were somebody confused props with attributes. I am not making the same mistake here.
    22
    3 I'm afraid you are, because `[…]` [http://api.jquery.com/category/selectors/attribute-selectors/ selectors] target attributes, not properties. And only properties recognized as [http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#boolean-attributes 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.
     3I'm afraid you are, because `[…]` [http://api.jquery.com/category/selectors/attribute-selectors/ selectors] target attributes, not properties. And only attributes recognized as [http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#boolean-attributes 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.