Bug Tracker

Opened 5 years ago

Closed 5 years ago

#14884 closed bug (notabug)

jQuery not fetching current results for data-attribute

Reported by: develop@… 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.

Change History (1)

comment:1 Changed 5 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.