jQuery already has a slide toggle:
http://docs.jquery.com/Effects#slideToggle.28_speed.2C_callback_.29

There's no reason to use a plugin for it.

@Christopher - Your final code would look something like this:

   $(document).ready(function() {
                       // Attach toggle function:
                       $("#user_type_super_x").click(function() {
                               $("#permision_block").slideToggle(1000);
                       });
   });

I think you meant to do 1000 instead of 1 - all jQuery animations are
measured in milliseconds. Of course, you could also do something like:
"slow" instead.

--John

On 2/26/07, FreakDev <[EMAIL PROTECTED]> wrote:
> hi,
>
> i don't really understand your code, you define two different function for
> the same click event...
>
> you should check "SlideToggleDown" function from Interface 1.2
>
>  http://interface.eyecon.ro/demos/ifx.html#slide-fx
> http://interface.eyecon.ro/docs/fx
>
> ++
>
> FreakDev
>
>
> On 2/26/07, cdvrooman <[EMAIL PROTECTED]> wrote:
> >
> > Hello,
> >   I am using slideUp and slideDown, with each attached to a radio button
> via
> > click(). Here is the code:
> >     $(document).ready(function() {
> >                         // Attach hide/show functions:
> >
> $("#user_type_super_x").click(function() {
> >
> $("#permision_block").slideUp(1);
> >                         });
> >
> $("#user_type_user_x").click(function() {
> >
> $("#permision_block").slideDown(1);
> >                         });
> >     });
> >
> >
> >   After I click on the first radio button and "slideUp" the content, if I
> > click on the same button again, the content appears and then slidesUp
> again.
> >
> >   If the content is already hidden, shouldn't it by default not be
> possible
> > to make it appear again (however briefly) by repeated applications of the
> > slideUp function?
> >
> >   The same is true for slideDown. After sliding down the content, I can
> make
> > it slideDown repeatedly.
> >
> >   Should I check the height or transparency first before permitting
> > slideUp/slideDown to fire?
> >
> >   Thanks,
> >       Christopher.
> > --
> > View this message in context:
> http://www.nabble.com/possible-slideUp-slideDown-bug--tf3296684.html#a9170964
> > Sent from the JQuery mailing list archive at Nabble.com.
> >
> >
> > _______________________________________________
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
>
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to