Skittles
Skittles

Reputation: 2918

jQuery UI Sortable odd results

I've spent several hours on this and scoured google and SO looking for solutions, but I cannot seem to figure out what's wrong with this code.

I would have posted the code here, but it would be messy. The source of the data is coming from an ajax call using getJSON.

$.getJSON('/admin/ajax_get_avail_roles/' + index, function(data2) {

}

http://jsfiddle.net/CSDVU/

Could someone please examine the working example on jsFiddle and kindly tell me how come there seems to be commas showing up in my sortable list?

Many thanks in advance for your assistance.

Upvotes: 0

Views: 56

Answers (2)

Christian Phillips
Christian Phillips

Reputation: 18749

I have updated your fiddle, just added items.join('')

Upvotes: 0

PSL
PSL

Reputation: 123739

Comma is being placed by items.join() try changing it to items.join("")

Demo

From Documentation

separator : Specifies a string to separate each element of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma.

Upvotes: 1

Related Questions