HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> <h1>jQuery one() Method</h1> <p>Click on this paragraph to increase its text size. The event will trigger only once.</p> <script> $(document).ready(function(){ $("p").one("click", function(){ $(this).css("font-size","+=5px"); }); }); </script> </body> </html>
OUTPUT
×

Save as Private