172
rated 0 times
[
179]
[
7]
/ answers: 1 / hits: 47115
/ 12 Years ago, tue, june 12, 2012, 12:00:00
I have the following code:
alert($embellishment.data(embellishmentId));
alert($embellishment.attr(data-embellishmentId));
The first alert returns undefined
, whereas the second alert returns an integer, 3
.
I'm using jQuery version 1.7.2 (data
was added with version 1.4 I believe)
Why is this? Should I be using data()
at all if its not returning the right values?
More From » jquery