Share Coding

Tutorials, Problems, Stuffs …

jQuery Basic Animation

hide/show( animationType, [options], [speed], [callback] )

  • Animation always start from hide/show
  • Every animationType require different options, google serach “jquery effect drop” could found it at first result.

others: fadeOut/fadeTo/fadeIn…

 

Below is an example.

<script>

$(function() {
	// execute an hide effect to id="effect" now,then excute callback function
	$( "#effect" ).hide( "drop",{ direction: "down" }, 1000, callback );
});

function callback() { alert("effect is finished."); }

</script>
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: