Klaus Hartl wrote:

Glen Lipka wrote:
var myString = "";

$("#container .item").each(function(i){
  myString = myString + "," + this.id <http://this.id>;
});

$("#myInput").val(myString);

Hope this helps.  Glen

I like oneliners:

var ids = $.map($('#container [EMAIL PROTECTED]'), function() { return this.id; }).join(',');


Setting the value was missing:

$("#myInput").val( $.map($('#container [EMAIL PROTECTED]'), function() { return this.id; }).join(',') );


--Klaus

Reply via email to