Jquery Slide

jQuery Effects - Sliding


The jQuery slide methods slide elements upward in addition to down.
Click to slide down/up the panel

Examples

jQuery slideDown()
Demonstrates the jQuery slideDown() method.
jQuery slideUp()
Demonstrates the jQuery slideUp() method.
jQuery slideToggle()
Demonstrates the jQuery slideToggle() method.

jQuery Sliding Methods

With jQuery y'all tin practise a sliding lawsuit on elements.
jQuery has the next slide methods:
  • slideDown()
  • slideUp()
  • slideToggle()

jQuery slideDown() Method

The jQuery slideDown() method is used to slide downwards an element.
Syntax:
$(selector).slideDown(speed,callback);
The optional speed parameter specifies the duration of the effect. It tin accept the next values: "slow", "fast", or milliseconds.
The optional callback parameter is a share to last executed later the sliding completes.
The next instance demonstrates the slideDown() method:

Example

$("#flip").click(function(){
    $("#panel").slideDown();
});

jQuery slideUp() Method

The jQuery slideUp() method is used to slide upward an element.
Syntax:
$(selector).slideUp(speed,callback);
The optional speed parameter specifies the duration of the effect. It tin accept the next values: "slow", "fast", or milliseconds.
The optional callback parameter is a share to last executed later the sliding completes.
The next instance demonstrates the slideUp() method:

Example

$("#flip").click(function(){
    $("#panel").slideUp();
});

jQuery slideToggle() Method

The jQuery slideToggle() method toggles betwixt the slideDown() in addition to slideUp() methods.
If the elements lead maintain been slid down, slideToggle() volition slide them up.
If the elements lead maintain been slid up, slideToggle() volition slide them down.
$(selector).slideToggle(speed,callback);
The optional speed parameter tin accept the next values: "slow", "fast", milliseconds.
The optional callback parameter is a share to last executed later the sliding completes.
The next instance demonstrates the slideToggle() method:

Example

$("#flip").click(function(){
    $("#panel").slideToggle();
});


     

Comments

Popular posts from this blog

What Are The Main Components of a Computer System

Top Qualities To Look For In An IT Support Team

How To Integrate Google Adwords Api Into Codeigniter?