Javascript Ajax jQuery Html PHP Example Quiz New MORE
Need a Website Or Web Application.Contact : +91 9437911966 (Whatsapp) Note: Paid Service

jQuery slideToggle() Method With Example

In jQuery slideToggle() method is used to toggle between slideDown() and slideUp() effects.

If the HTML elements have been slide down, slideToggle() will slide them up.

If the elements have been slide up, slideToggle() will slide them down.

jQuery slideToggle() Syntax


The speed parameter is required and used to specifies the duration of the effect. It can take the following values: "slow", "fast", or milliseconds.

Please see the below example to get better knowledge about slideToggle().


<!DOCTYPE html>  
<html lang="en">  
  <meta charset="utf-8">  
  <title>slide toggle</title>  
  height: 150px;
  width: 150px;
  background-color: #66ff6b;;
  border-radius: 50%;
  display: inline-block;

#panel {
  padding: 50px;
 <script src=""></script>
<div id="panel"></div>
<button id="flip">Click to slide toggle</button>

Run it Yourself »