Javascript examples for jQuery Method and Property:fadeToggle
Call function after fadeToggle effect
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("p").fadeToggle("slow", function(){ console.log("The fadeToggle effect is finished!"); });/*from ww w. ja v a 2s.c o m*/ }); }); </script> </head> <body> <button>Click me</button> <p>This is a paragraph.</p> </body> </html>