The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

sublime99 (2) [Avatar] Offline
#1
I am trying to get Sortable.sequence to work with dynamically created data. The drag drop works fine but when i try to get the order I receive empty strings.

With hardcoded div data Sortable.sequence works as expected but when I try this I get empty strings:
var div = document.createElement('DIV');
div.innerHTML ="<div id="item_" + num + " "class="sortList"> <input type=checkbox name="objselect" value="image_0"> Image: *img1</div>";
$($('group_1')).appendChild(div);
Sortable.create("group_1",{tag:'div',onChange:sortChange,onUpdate:sortUpdate});
num++;


function sortUpdate() {
id_array = Sortable.sequence('group_1');
alert(id_array);
}