jQuery slideToggle()
The jQuery fadeToggle() method slides the elements upside, if the elements have been slid down, and slides the elements down if the elements have been slid up. The jQuery slideToggle() method is used to toggle the elements in between the slideUp() and slideDown() methods. Example: <!DOCTYPE html> <html> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js”></script> <script> $(document).ready(function(){ $(“#flip”).click(function(){ $(“#panel”).slideToggle(); … Read more