Hi craig,

I think it's internally manage, so you can't click while sliding.
And when you click it's slide depending on the position of the element
you try to slide.

Just one thing to remember is that you need to encapsulate you element
in a DIV inside the DIV you try to slide.

hope that help?


On 17 fév, 11:16, craig <bagley.cr...@gmail.com> wrote:
> I'm using the SlideUp/SlideDown effects, and I'd like to use the same
> button for both effects.  Context from the demo wiki:
> <img src="/images/uparrow.png" onclick="Effect.SlideUp('<%=slidedown
> %>'); return false;">
> <img src="/images/downarrow.png" onclick="Effect.SlideDown('<
> %=slidedown%>'); return false;">
> I tried (probably stupidly because of my lack of knowledge with html
> and javascript) to use a logical XOR and logical OR to sort of
> "conditionalize" the onclick effect, but it ends up completing both
> functions resulting in no change:
> <img src="/images/uparrow.png" onclick="Effect.SlideUp('<%=slidedown
> %>') ^ Effect.SlideDown('<%=slidedown%>');">
> or
> <img src="/images/uparrow.png" onclick="Effect.SlideUp('<%=slidedown
> %>') || Effect.SlideDown('<%=slidedown%>');">
> Is there a way to do this without getting too complicated with
> javascript.  Or, even a way to make a conditional like <%if
> Effect.SlideUp('<%=slidedown%>') == true; Effect.SlideUp('<%=slidedown
> %>') ; else Effect.SlideDown('<%=slidedown%>')%>
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to