How to implement the callback parameter in the following fade in/out code . ? Please help me to solve out the problem? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to implement the callback parameter in the following fade in/out code . ? Please help me to solve out the problem?

$(function() { $("p").click(function() { $("div").toggle(1000); }); });

18th Mar 2023, 6:44 AM
Sony
Sony - avatar
1 Answer
0
$(function() { $("p").click(function() { $("div").fadeOut(1000, function() { console.log("Fade out complete!"); }).fadeIn(1000, function() { console.log("Fade in complete!"); }); }); });
26th Mar 2023, 6:05 PM
Abdul Azeez Naseer Khan
Abdul Azeez Naseer Khan - avatar