开发者

Getting jquery UI sortable to work, one part I don't understand

开发者 https://www.devze.com 2023-03-09 05:24 出处:网络
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 fu

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消