World changes day by day!

Sunday, May 10, 2015

Know about jQuery effects

No comments
The jQuery library provides several techniques for adding animation to a web page. There are many jQuery effects which will provides to do various kind of amazing effects with web interface. The jQuery API have many jQuery methods allow us to quickly apply commonly used effects, the jQuery effects. This tutorial deals with important jQuery effects.

Basic jQuery effects

Showing and Hiding Elements with jQuery

There are two functions, hide() and show() for showing and hiding any DOM elements. 
Syntax :
.show( duration [, easing ] [, complete ] ) 
.hide( duration [, easing ] [, complete ] )

Where the meanings are  -
        • duration (default: 400)
          • Type: Number or String
          • A string or number determining how long the animation will run.
        • easing (default: swing)
          • Type: Number or String
          • A string or number determining how long the animation will run.
$(selector).hide(speed,callback);
$(selector).show(speed,callback);

$("#hide").click(function(){
  $("p").hide();
});

$("#show").click(function(){
  $("p").show();
});

No comments :

Post a Comment

Leave Your comments