Im having an issue or possibly a expected result with JQuery's .data() method. Im unsure why when using the element selector the data values are not updated after running the data method. See the screenshot for an example of what im talking about.
Im unsure why when using the data(key,value) method, it updates the elements data with the expected output. However why is it that it doesnt updated the values html attribute? My knowledge in Javascript is still very limited, but i'd love to know what this is and if i should expect this.