jQuery slideUp() Method

jQuery slideUp() method perform sliding up motion effect to hide the selected elements. The slideUp() method animates the height of the selected elements.


This syntax represent to the slideUp() method

$(selector).slideUp( duration, easing, callback );
Parameter Type Description
duration Number
Required. Accept string or number that determining how long the slide effect will run.
default value is 400
Accepted values:
  • Predefined duration ("slow", "normal", "fast")
  • number of milliseconds (3000, 1000)
easing String Optional. Specifies the which easing function to use for the transition.
default value is "swing"
Accepted values:
  • "swing" - elements moves slows at the starting and ending, but faster in the middle
  • "linear" - elements moves in a constant speed
callback Function Optional. A function to call once the the slide effect is complete.


Here, in this example show slideUp() effect on selected elements when click on button.

<!DOCTYPE html>
  <title>jQuery slideUp() method</title>
  <script src="jquery-latest.min.js"></script>
    $(document).ready(function() {
  <style type="text/css"> 
    #slide, #click {
      font-family: Verdana;
      font-size: 14px;
      background: #CCCCCC;
      border: 1px solid #c3c3c3;
      text-align: center;
    #slide {
      height: 60px;
  <div id="slide">
    <p>This paragraph text represent slide panel text and it's running slide effect.</p>
  <p id="click">Click me to slide down</p>

Run it...   »