jQuery Tutorial


jQuery Example


jQuery References


jQuery Animations Effect Method




jQuery Animations Effect Method

Syntax

$(selector).animate({css_property},[duration],[callback]);

css_property write by the following way...

animate({width:"70%",fontSize:"14px",fontFace:"Verdana"});
  • duration: Elements is a represent by three predefined String duration ("slow", "normal", "fast"). Otherwise number represent by milliseconds (Ex. 5000).
  • callback: Callback is optional parameter. It is use to represents a function to be executed whenever effect is completed.

Animate Example:

<script type="text/javascript"> 
$(document).ready(function(){
  $("button").click(function(){
    $("div").animate({fontSize:"80px"},"slow");
  });
});
</script>
Online Try This Code Your Self....   »

Some jQuery Effect Methods

Following some commonly use of event methods in jQuery:

Method Description
$(selector).show() Selected Element is Show.
$(selector).hide() Selected Element is Hide.
$(selector).toggle() Selected Element is Toggle (Hide or Show both).
$(selector).slideDown() Selected Element is Slide Down.
$(selector).slideUp() Selected Element is Slide Up.
$(selector).slideToggle() Selected Element is Toggle (Slide Up or Slide Down both).
$(selector).fadeIn() Selected Element is Fade In.
$(selector).fadeOut() Selected Element is Slide Out.
$(selector).animate() Selected Element is animate by the run of custom effect.

Full Reference on jQuery Event References Learn on jQuery Events References.