Category: Effect
-
Chaining
With jQuery, you can chain together actions/methods. Chaining allows us to run multiple jQuery methods (on the same element) within a single statement. jQuery Method Chaining Until now we have been writing jQuery statements one at a time (one after the other). However, there is a technique called chaining, that allows us to run multiple…
-
jQuery Callback Functions
jQuery Callback Functions JavaScript statements are executed line by line. However, with effects, the next line of code can be run even though the effect is not finished. This can create errors. To prevent this, you can create a callback function. A callback function is executed after the current effect is finished. Typical syntax: $(selector).hide(speed,callback); Examples…
-
jQuery Stop Animations
The jQuery stop() method is used to stop animations or effects before it is finished.Start sliding Stop sliding Click to slide down/up the panel Examples jQuery stop() slidingDemonstrates the jQuery stop() method. jQuery stop() animation (with parameters)Demonstrates the jQuery stop() method. jQuery stop() Method The jQuery stop() method is used to stop an animation or effect before it…
-
Animation
With jQuery, you can create custom animations.Start Animation jQuery jQuery Animations – The animate() Method The jQuery animate() method is used to create custom animations. Syntax: $(selector).animate({params},speed,callback); The required params parameter defines the CSS properties to be animated. The optional speed parameter specifies the duration of the effect. It can take the following values: “slow”, “fast”, or…
-
Sliding
The jQuery slide methods slide elements up and 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 you can create a sliding effect on elements. jQuery has the following slide methods: jQuery slideDown()…
-
Fading
With jQuery you can fade elements in and out of visibility. Click to fade in/out panel Examples jQuery fadeIn()Demonstrates the jQuery fadeIn() method. jQuery fadeOut()Demonstrates the jQuery fadeOut() method. jQuery fadeToggle()Demonstrates the jQuery fadeToggle() method. jQuery fadeTo()Demonstrates the jQuery fadeTo() method. jQuery Fading Methods With jQuery you can fade an element in and out of…
-
Hide and Show
Hide, Show, Toggle, Slide, Fade, and Animate. WOW! Click to show/hide panel Examples jQuery hide()Demonstrates a simple jQuery hide() method. jQuery hide()Another hide() demonstration. How to hide parts of text. jQuery hide() and show() With jQuery, you can hide and show HTML elements with the hide() and show() methods: Example Syntax: The optional speed parameter specifies the speed of…