Well yes, but that's just a simple example. You could go and setup an 
animation that involves some extravagant set of movements or color 
flashing over the simple "squeeze this in this way", provide that as a 
type of show/hide animation, and then set that as default for .show().

~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com]
-Nadir-Point (http://nadir-point.com)
-Wiki-Tools (http://wiki-tools.com)
-MonkeyScript (http://monkeyscript.nadir-point.com)
-Animepedia (http://anime.wikia.com)
-Narutopedia (http://naruto.wikia.com)
-Soul Eater Wiki (http://souleater.wikia.com)

John Resig wrote:
>> $('#foo').show(); // Plain display set as current.
>> $('#foo').show('slow'); // Default animation using slow speed.
>> $('#foo').show({animate:'fade'}); // Show using a fade animation at
>> default speed.
>> $('#foo').show({animate:'slidedown', speed:'fast'}); // Show using a
>> slidedown animation
>> $('#foo').show({animate:function() {...}); // show using a custom
>> animation. (Not quite the same as using .animate; using it though .show
>> makes sure that the kind of cleanups and bug tweaks that .show and .hide
>> use are applied so the custom function doesn't need to)
>>
>> I'd need a lookover of the extensibility code to determine the actual
>> way a bit of code would look, but basically the list of different types
>> of animation could be extended, the short plugin like functions could be
>> created if you wanted. But the actual default animation used by
>> $('#foo').show('slow'); could be changed to use a different animation
>> from the list.
>>     
>
> That's precisely what doing .animate({ height: "hide" }, "slow") does
> (for example). Just add in the properties that you want to animate to
> a position - or to a hide/show/toggle state and all the animation and
> clean-up will be done.
>
> Want to animate left to right?
> .animate({width: "show"}, "slow");
>
> Simple.
>
> --John
>
> >
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to