In this article, we will describe on sliding effects. There are three slide effects available in jQuery. So let's start from slideDown() method.
jQuery slideDown() method is used to show hidden element in down slidding effect.
$(selector).slideDown(duration, callback);
duration is string 'slow', 'fast' or milliseconds
callback is a optional function which executes after the slideDown effect completes.
$('.normal').slideDown();
$('#slow').slideDown('slow');
$('div').slideDown(1000, function() {
alert('slideDown effect completed.');
});
jQuery slideUp() method
jQuery slideUp() method is used to hide element in up slidding effect.
$(selector).slideUp(duration, callback);
duration is string 'slow', 'fast' or milliseconds
callback is a optional function which executes after the slideUp effect completes.
$('.normal').slideUp();
$('#slow').slideUp('slow');
$('div').slideUp(1000, function() {
alert('slideUp effect completed.');
});
jQuery slideToggle() method
jQuery slideToggle() method hides and shows element in slidding effect. If the element is hidden, it will create slideDown effect else it will create slideUp effect.
$(selector).slideToggle(duration, callback);
duration is string 'slow', 'fast' or milliseconds
callback is a optional function which executes after the slideToggle effect completes.
$('.normal').slideToggle();
$('#slow').slideToggle('slow');
$('div').slideToggle(1000, function() {
alert('slideToggle effect completed.');
});
I hope it will help you.
Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]
How to detect Internet speed in JavaScript
Hello guys, In this article we will s...Laravel5.4 - Prevent Browser's Back Button Login After Logout
In this tutorials we are sharing with yo...How to create and download zip file using PHP
PHP provides simple method to create zip...How to Convert a Date to Timestamp in PHP
Use the strtotime() Function You can...How to get Next Previous Records in Laravel7.x with Example
We all ken that, Laravel is propagating...