this.items = [];\r
this.containers = [this];\r
var items = this.items;\r
- var queries = [$(this.options.items, this.element)];\r
+ var queries = [$.isFunction(this.options.items) ? this.options.items.call(this.element) : $(this.options.items, this.element)];\r
\r
if(this.options.connectWith) {\r
for (var i = this.options.connectWith.length - 1; i >= 0; i--){\r
for (var j = cur.length - 1; j >= 0; j--){\r
var inst = $.data(cur[j], 'sortable');\r
if(inst && !inst.options.disabled) {\r
- queries.push($(inst.options.items, inst.element));\r
+ queries.push($.isFunction(inst.options.items) ? inst.options.items.call(this.element) : $(inst.options.items, inst.element));\r
this.containers.push(inst);\r
}\r
};\r