I'm using HTML5's data to store some informations on a div on my website, and whenever I change the value of this data with jQuery, the DOM's updating well, but jQuery doesn't see the update when I try to retrieve the value.
I update the value of this data with $('#myDiv').attr('data-my_data',value);, and get the value back with $('#myDiv').data('data-my_data').
Here's the fiddle to illustrate my problem.
Is this happening because of some jQuery's initial representation of the DOM that doesn't update?
I don't get it, any help will be appreciated!
Configuration : Chrome 25 - jQuery 1.9.0 - Mac OSx 10.7
 
     
     
     
    