3
I was reading the jquery documentation and did not understand very well what the main difference between two already that both serve to store data from an html tag.
3
I was reading the jquery documentation and did not understand very well what the main difference between two already that both serve to store data from an html tag.
2
The only difference between .date() and Jquery.data() is that Jquery.data is a method of low level, compared to .date().
Comparing the code between the two, .date() is much more usual.
See the difference:
$("div").data("test");
var div = $("div")[0];
jQuery.data(div,"test");
Browser other questions tagged javascript jquery
You are not signed in. Login or sign up in order to post.
Good question, +1.. but I believe the most used is . data()
– Guilherme Lima