jQuery + Sortable + live

前端 未结 4 914
清酒与你
清酒与你 2020-12-31 12:51

I\'m adding list items to a page dynamically with $.get, then appending them to the OL element. Pretty usual to this point.

But jQuery isn\'t aware of these new ite

4条回答
  •  借酒劲吻你
    2020-12-31 13:45

    I found this solution and working fine for me.

    makesortable = function(){
            $( "#mylist" ).sortable({
                ...
            })
          };
    ...
    // after list refresh :
    makesortable();
    

提交回复
热议问题