Opened 9 years ago
Closed 9 years ago
#14884 closed bug (notabug)
jQuery not fetching current results for data-attribute
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.11.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Please see http://jsfiddle.net/Ldb9G/
I used knockout for this example. Knockout changes the data-attribute "area" over the time. If you fetch data using jQuery, only the first value is returned. The DOM's "GetAttribute"-Method works as expected returning the freshest value at all times.
Note: See
TracTickets for help on using
tickets.
Yes, as documented in http://api.jquery.com/data/ . Use
.attr()
if you always want the attribute.