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, Bryank <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
> I will make this example as simple as possible.
>
> I have  2 divs, each containing list items. When an item in box #1 is
> clicked, I want to move it to box #2. When that same item is clicked
> in box #2, I want to move it to box #1.
>
> My co-worker and I are working on this and here is some code he put
> together:http://pastie.caboo.se/137728
>
> My original method was using something like this:
>
> $(document).ready(function() {
>
>   $('#suggestedCategories ul li a').click(function() {
>   $('#selectedCategoriesList').append('<li><a href="#"
> onclick="removeItem(this); return false;">' + $(this).html() +  '</a></
> li>');
> $(this.parentNode).remove();
>
> });
> });
>
>  function removeItem(el) {
>         $('#suggestedCategories ul').append('<li><a href="#">' + $(el).html()
> + '</a></li>');
>         $(el.parentNode).remove();
>
>  }
>
> I want to know if there is a cleaner easier way to pull this off then
> what was pasted at:http://pastie.caboo.se/137728
>
> Thanks,
> Bryan

Reply via email to