Side navigation
#14884 closed bug (notabug)
Opened March 13, 2014 08:07AM UTC
Closed March 13, 2014 01:07PM UTC
jQuery not fetching current results for data-attribute
| Reported by: | develop@dieploegers.de | 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.
Attachments (0)
Change History (1)
Changed March 13, 2014 01:07PM UTC by comment:1
| resolution: | → notabug |
|---|---|
| status: | new → closed |
Yes, as documented in http://api.jquery.com/data/ . Use
.attr()if you always want the attribute.