[jQuery] Re: How to create dom element with a defined behaviour ?

2007-09-24 Thread xavier
On Sep 23, 11:00 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote: > You could reverse the logic and use the prependTo method instead of prepend. > > $('.container').each( function() { > $('Do something a>') > .prependTo(this) > .click(doSomething); Smarter indeed. Thx. > You

[jQuery] Re: How to create dom element with a defined behaviour ?

2007-09-23 Thread Brandon Aaron
You could reverse the logic and use the prependTo method instead of prepend. $('.container').each( function() { $('Do something') .prependTo(this) .click(doSomething); You could also use the Live Query plugin to create a set of behaviors associated with selectors that will bin