diff --git a/src/jquery.draggable.js b/src/jquery.draggable.js index 17919582..3a3660d5 100644 --- a/src/jquery.draggable.js +++ b/src/jquery.draggable.js @@ -14,7 +14,7 @@ limit: true, offset_left: 0, autoscroll: true, - ignore_dragging: ['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON'], + ignore_dragging: ['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON'], // or function handle: null, container_width: 0, // 0 == auto move_element: true, @@ -387,6 +387,10 @@ return !$(event.target).is(this.options.handle); } + if ($.isFunction(this.options.ignore_dragging)) { + return this.options.ignore_dragging(event); + } + return $(event.target).is(this.options.ignore_dragging.join(', ')); };