- duration
- A string or number determining how long the animation will run.
- easing
- A string indicating which easing function to use for the transition.
- callback
- A function to call once the animation is complete.
![]() ![]() |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | <html> <head> <title>jQuery slideUp() example</title> <link rel= "stylesheet" type= "text/css" /> <style type= "text/css" > .someText{ margin-top:16px; width:500px; height:250px; background-color: #8b8378; color: #ffffff; } </style> <script type= "text/javascript" ></script> <script type= "text/javascript" ></script> <script type= "text/javascript" > $(document).ready( function () { $( "#myButton" ).click( function () { $( '#section' ).slideUp(2000, 'linear' , function () { //callback function after animation finished $( "#myButton" ).attr( 'value' , 'slideUp() is now Complete' ); }); }); }); </script> </head> <body> <fieldset> <legend>jQuery page animation using slideUp()</legend> <div> <input id= "myButton" type= "button" value= "Click here to see slideUp()" /> </div> <div id= "section" class= "someText" > Just some TEXT for JQuery page Animation ... </div> </fieldset> </body> </html> |
No comments:
Post a Comment
NO JUNK, Please try to keep this clean and related to the topic at hand.
Comments are for users to ask questions, collaborate or improve on existing.