Skip to content
Permalink
Browse files

sortable: options.item can now be a function that returns a jQuery co…

…llection
  • Loading branch information
Paul Bakaus
Paul Bakaus committed May 29, 2008
1 parent dea9af8 commit aba9f3253192bb4763650f16e9d2ed66092d6aac
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/source/ui.sortable.js
@@ -159,15 +159,15 @@
this.items = [];
this.containers = [this];
var items = this.items;
var queries = [$(this.options.items, this.element)];
var queries = [$.isFunction(this.options.items) ? this.options.items.call(this.element) : $(this.options.items, this.element)];

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

0 comments on commit aba9f32

Please sign in to comment.
You can’t perform that action at this time.