Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
$.data is not consistent with $("selector").data in jQuery 2.0 #2779
When store something with
you cannot get it, with the
The behaviour is new in the version 2.0, while version 1.11.3 get the stored data correctly
=> test case in version 1.11.3
=> test case in version 2.1.4
Thanks for the report. This will be fixed in jQuery 3.0: http://jsbin.com/gehotepamo/1/edit?html,js,output. We planned to fix that there on both branches but we'll have only one jQuery 3.0.0 after all.
I'm not sure what to do about it in the upcoming jQueries 1.12/2.2. This inconsistency is unfortunate as we declare API compatibility between 1.x & 2.x. Thoughts, @jquery/core? Do we want to patch it?