Putting apostrophes on a comma separated string
I have this sortable
http://jsfiddle.net/thiswolf/HJBc3/1/ and it gets me a list of comma separated string for instance five,5056e32ccb09d,5056e33c86eb5 but i would like 'five','5056e32ccb09d','5056e33c86eb5'
Here is the jquery code i am using
- jQuery(function() {
- $('.krudSpace').sortable({
- update: function(event, ui) {
- var newOrder = $(this).sortable('toArray').toString();
- alert(newOrder);
- //five,5056e32ccb09d,5056e33c86eb5
- //'five','5056e32ccb09d','5056e33c86eb5'
- //$.post('saveSortable.php', {order:newOrder});
- }
- });
- });
I am trying this
- var spl = newOrder.toString().split(",");
- alert(newOrder);
How can have the apostrophes i require on each item?.