[jQuery] Re: toggle min/max effect

2007-06-26 Thread Glen Lipka
Use the toggle function, but on the inside of it use the animate, not the slideToggle stuff. $(p).toggle(function(){ $(this).animate({ height: 50 }, 500); },function(){ $(this).animate({ height: 250 }, 500); }); totally untested, but this should help get you started. You can even get the

[jQuery] Re: toggle min/max effect

2007-06-26 Thread [EMAIL PROTECTED]
Thanks, it worked like a charm. Here is what I ended up doing: !-- ### In the head ### -- style type=text/css #area{margin:0 auto 5px; padding:0 5px 5px; height:75px; overflow:hidden; border:1px solid #000; position:relative; width: 600px;} #area h2, #area p{margin:0; padding:0 0 10px;} #area

[jQuery] Re: toggle min/max effect

2007-06-26 Thread Glen Lipka
What does the pipe do in this part? $(#area p|span) Also, what is the reason for /* ![CDATA[ */ I see that alot, but never knew why its used. Glen On 6/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks, it worked like a charm. Here is what I ended up doing: !-- ### In the head ###

[jQuery] Re: toggle min/max effect

2007-06-26 Thread Su
On 6/26/07, Glen Lipka [EMAIL PROTECTED] wrote: Also, what is the reason for /* ![CDATA[ */ I see that alot, but never knew why its used. It's the hyper-paranoid/proper way of hiding your scripts from non-supporting browsers, from what I recall.

[jQuery] Re: toggle min/max effect

2007-06-26 Thread Su
On 6/26/07, Su [EMAIL PROTECTED] wrote: On 6/26/07, Glen Lipka [EMAIL PROTECTED] wrote: Also, what is the reason for /* ![CDATA[ */ I see that alot, but never knew why its used. It's the hyper-paranoid/proper way of hiding your scripts from non-supporting browsers, from what I recall.

[jQuery] Re: toggle min/max effect

2007-06-26 Thread [EMAIL PROTECTED]
I was trying to use the Logical Operator OR (||) but could only get it to work with one pipe (|). Simple I wanted to say when either the #area p OR span tag is clicked run the code. CDATA is the XML way of escaping. Essentially, everything inside a CDATA section is ignored by the parser. And

[jQuery] Re: toggle min/max effect

2007-06-26 Thread Glen Lipka
Wouldn't the comma be easier? $(#area p,span) Glen On 6/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I was trying to use the Logical Operator OR (||) but could only get it to work with one pipe (|). Simple I wanted to say when either the #area p OR span tag is clicked run the code.

[jQuery] Re: toggle min/max effect

2007-06-26 Thread [EMAIL PROTECTED]
slapping self on forehead Doh! Ya, I guess you're right, that works too: $(#area p,span).not(#nonClick).click(function(){ alert(it worked); };) Matthew, Thanks again. On Jun 26, 12:16 pm, Glen Lipka [EMAIL PROTECTED] wrote: Wouldn't the comma be easier? $(#area p,span) Glen On 6/26/07,