Great!  One suggestion: you might consider passing a function in the
callback, as opposed to defining the function in the callback's
invocation.

It's just cleaner that way, easier to maintain, and generally easier
to extend further.

I'm a firm believer that "events should call (delegate to) methods",
as opposed to putting code

**--**  Steve


On Sep 14, 1:16 pm, TehNrd <[email protected]> wrote:
> That worked! I would have never figured that you. This doesn't give me
> the exact effect I was looking for, sliding panels, but it is close.
>
> Here is the updated script that works.
>
> <script>
>         $(document).ready(function(){
>                 $(".panel:not(:first)").hide();
>                 $(".panel").click(function(){
>                         $(this).hide("slide", { direction: "left" }, 
> 500,function(){
>                                         if($(this).next().hasClass("panel")){
>                                                 $(this).next().show("slide", 
> { direction: "right" }, 500);
>                                         }else{
>                                                 
> $(".panel:first").show("slide", { direction: "right" }, 500);
>                                         }
>                                 }
>                         );
>                 });
>         });
> </script>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" 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-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to