Let me clarify my intent: I have two users, a "Superuser" with only a "superuser" right, and a plain "User" who may have 1 or many rights.
If the Superuser radio button is selected, then I want the available permision list to "slideUp", because no other rights need to be selected. However, if the "User" radio button is selected, then I want to make the list of possible "user" associated rights visible via "slideDown". That is why I opted to not use slideToggle because clicking on either radio button would either show or hide the permission_block depending on its last state. Do you see where I am going now? That's why I want to only permit the slideDown to fire when the condition of the "permission_block" is hidden, and vice versa for slideUp. Cheers, Christopher. P.S. I'm using (1) to make the block show or hide itself as fast as possible. However, while on the subject... although I'm using $(document).ready(function() { } to hide the block when a user already has the "Superuser" right (and shouldn't see the other permissions), I still briefly see the permissions_block right before it hides itself. I thought it should already be hidden by the time the page loads itself? Or do I have to set its css to block:hidden ? Thanks. John Resig wrote: > > 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. > > -- View this message in context: http://www.nabble.com/possible-slideUp-slideDown-bug--tf3296684.html#a9240156 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/