The part I开发者_如何转开发 don't understand in the code below is "function(serialized)". I know change means when the change event has occured run the positions() function but I don't see what function(serialized) signifies?
$('#col').Sortable(
{
accept: 'widget',
opacity: 0.5,
helperclass: 'helper',
change: function(serialized) { positions(); },
handle: '.titlebar'
}
);
function(serialized) { positions(); }
the anonymous function is called on change and the var serialized will contain the data. It is most likely called "serialized" as that is how the data will be structured. You could change that to function(great_bit_of_data) { positions(); }
and it should still work as there's nothing in the function using the var.
精彩评论