[jQuery] Re: Want to move content back and forth between containers with jquery

2008-01-11 Thread Karl Swedberg
Hi Todd, sorry for the late delay in replying. Yeah, that looks great. No sense in unbinding and re-binding when the elements don't need it. The main things I tried to do were to (1) avoid removing and re-creating the elements, and (2) move the onclick handler out of the HTML and into

[jQuery] Re: Want to move content back and forth between containers with jquery

2008-01-10 Thread Karl Swedberg
Hi Bryan, I threw something together pretty quickly, so I'm sure it could be further improved. Here is a demo, based on your pastie code: http://test.learningjquery.com/moveli.html Here is the jQuery: $(document).ready(function() { var moveLi = function() { $('#suggestedCategories,

[jQuery] Re: Want to move content back and forth between containers with jquery

2008-01-10 Thread Bryank
I just posted 2 demos to check out, one using the pastie up above, and another one using modified code. http://btk.name/jquery/move_items/move_items.html http://btk.name/jquery/move_items/move_items2.html Here is the pastie for move_items2.html: http://pastie.caboo.se/137756 Thanks, Bryan On

[jQuery] Re: Want to move content back and forth between containers with jquery

2008-01-10 Thread Bryank
I have posted 2 links as demos that offer different versions for the Jquery code http://btk.name/jquery/move_items/move_items.html http://btk.name/jquery/move_items/move_items2.html and for the code only on move_items2.html: http://pastie.caboo.se/137756 Thanks, Bryan On Jan 10, 10:13 am,

[jQuery] Re: Want to move content back and forth between containers with jquery

2008-01-10 Thread Todd
Karl, How does this look for an improved version? (im bryan's coworker that he spoke of) $(document).ready(function() { var moveLi = function(el) { if(!el){ $('#suggestedCategories ul li a') .click(function() {