elin-r
4/23/2018 - 9:47 PM

Get and prepend multiple elements

var shiftid = [];
var pre = "#";
   $('table.shift').each(function(i){
    shiftid[i] = $(this).attr("id");
} );

var element = pre + shiftid.join(', ' + pre);

console.log(element);