So, i was reading the jquery documentation and i couldn't identify the differences between the functions jQuery.data() and .data(). What are the main difference between those functions?
Here is the link to documentation: Doc jquery
So, i was reading the jquery documentation and i couldn't identify the differences between the functions jQuery.data() and .data(). What are the main difference between those functions?
Here is the link to documentation: Doc jquery
From the link you provided - it would appear it is simply just an older way of calling the same functionality in a more 'vanilla javascript' way...but it would appear there is one actual difference listed.
Note: This is a low-level method; a more convenient .data() is also available.
Regarding HTML5 data-* attributes: This low-level method does NOT retrieve the data-* attributes unless the more convenient .data() method has already retrieved them.