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(); });  

http://jsfiddle.net/esnls/84/

use :

$("#out1").val( dayshift.join(',')); $("#out2").val( nightshift.join(','));  

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -