0

So I have a lack of vocabulary there.

I'm trying to understand the difference between $.data('value') and $.attr('data-value')

Of what I'm understanding, the both are set up on load as long as there is the attribute data-value="kitty" on the html tag.

However when I'm trying to interract with them they are independent

enter image description here

So first of all I'd like to understand what is happening there :/.

And secondly is there a way to interact with both at the same time?

JsFiddle for test

Baldráni
  • 5,332
  • 7
  • 51
  • 79

0 Answers0