MENU
Element Association
$.data(Element e, String key, Any value)<br>Associate arbitrary data with an element.<br><br>$.data(Element e[, String key])<br>Return the value associated with an element.<br>$.hasData(Element e)Determine if an element has any associated data.<br>$.removeData(Element e [, String key])<br>Remove a piece of data previously associated with an element.
RESETRUNFULL
RESETRUNFULL
<!DOCTYPE html><html><head>
<script src="jquery-3.5.1.min.js"></script></head><body>
<div></div>
<script>
d = $('div')[0];
$.data(d, 'a', 100);
$.data(d, 'b', 200);
alert($.data(d,'a')); // 100
alert($.data(d).b); // 200
$.removeData(d);
alert($.data(d).b); // undefined
</script></body></html>
<!DOCTYPE html><html><head>
<script src="jquery-3.5.1.min.js"></script></head><body>
<p>Hello World</p>
<script>
$('p').fadeOut(5000)
.fadeIn(5000)
.slideUp(5000)
.slideDown(5000);
$.queue($('p')[0],'fx',function(){
alert('animation completed!');});
</script></body></html>