difference between .on and .one in JQ
by manoj
HTML
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>.one event aon p tag</p>
<p>This is another paragraph.</p>
<p>.ON Event on Span</p>
<span>Click any p element to increase its text size. The event will only trigger once for each p element.</span>
</body>
</html>
JavaScript
$(document).ready(function(){
$("p").one("click",function(){
$(this).animate({fontSize:"+=6px"});
});
});
$(document).ready(function(){
$("span").on("click",function(){
$(this).animate({fontSize:"+=6px"});
});
});