jquery-ui connected lists append output to textarea -
so don't know doing when comes jquery, , pieced script together. trying have 3 jquery-ui lists connected, works, capture content of each list individually. need #sortableequipmentday , #sortableequipmentnight. if @ jsfiddle included you'll see moving items lists gives random output , not id's of 2 lists i'm looking for.
also .append doesn't appear clear old data adds onto text inside text area.
any awesome!
javascript: $(function() { var lists = $( "#equipmentpool, #sortableequipmentday, #sortableequipmentnight" ).sortable({ connectwith: 'ul.droptrue', update: function() { lists.each(function(){ var dayshift = $("#sortableequipmentday").sortable("toarray"); var nightshift = $("#sortableequipmentnight").sortable("toarray"); $("#out1").append( dayshift.join(',')); $("#out2").append( nightshift.join(',')); }); } }).disableselection(); });
use :
$("#out1").val( dayshift.join(',')); $("#out2").val( nightshift.join(','));
Comments
Post a Comment