[jQuery] Re: Chaining - Best Practices?

2007-05-31 Thread latinomigs

Well I realized my mistake in the code above...

It is meant for the following HTML:

div id=wrapAll
div id=aBox
div id=aChildp/p/div
/div
p id=bottomText/p
/div

So my error was in using the .children() selector to find both #aBox
and #aChild. If I use .find() instead of .children() then it works
perfectly.

On May 31, 12:56 pm, Sean Catchpole [EMAIL PROTECTED]
wrote:
 Chaining is more useful for quick compact statements.
 ex: $(p).hide().addClass(bar).click(function(){
 alert(this.innerHTML); }).slideDown();

 ~Sean



[jQuery] Re: Chaining - Best Practices?

2007-05-31 Thread Ⓙⓐⓚⓔ

glad you found it... it was a beautiful chain!

On 5/31/07, latinomigs [EMAIL PROTECTED] wrote:



Well I realized my mistake in the code above...

It is meant for the following HTML:

div id=wrapAll
div id=aBox
div id=aChildp/p/div
/div
p id=bottomText/p
/div

So my error was in using the .children() selector to find both #aBox
and #aChild. If I use .find() instead of .children() then it works
perfectly.

On May 31, 12:56 pm, Sean Catchpole [EMAIL PROTECTED]
wrote:
 Chaining is more useful for quick compact statements.
 ex: $(p).hide().addClass(bar).click(function(){
 alert(this.innerHTML); }).slideDown();

 ~Sean





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ