Bug Tracker

Opened 9 years ago

Closed 9 years ago

#14884 closed bug (notabug)

jQuery not fetching current results for data-attribute

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.0
Keywords: Cc:
Blocked by: Blocking:


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.

Change History (1)

comment:1 Changed 9 years ago by dmethvin

Resolution: notabug
Status: newclosed

Yes, as documented in http://api.jquery.com/data/ . Use .attr() if you always want the attribute.

Note: See TracTickets for help on using tickets.