views:

50

answers:

0

I am trying to place products in to cateogories, like

<ul id="Category1"></ul>
<ul id="Category2"></ul>

<ul id="Available">
 <li id="prod1">Product1</li>
 <li id="prod2">Product2</li>
</ul>

I want to drop the available products in to a category and when its dropped to post the update back via ajax. It doesn't really matter what is posted back, whether it's the updated category or all the categories.

$(document).ready(function() {
    $("tr:even").css("background", "#f7f7f7");
    $("ul.drop").sortable({
        connectWith: 'ul',
        tolerance: 'pointer',
        stop: function(ev, ui) {
             ?????
        }
    });
});

Can i make this work or should I be using drag and drop?