From 16bf388a8128dcb5de5d764df41c677371c70505 Mon Sep 17 00:00:00 2001 From: RubaXa Date: Tue, 22 Sep 2015 08:45:21 +0300 Subject: [PATCH] * callArgs -> args --- jquery.binding.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/jquery.binding.js b/jquery.binding.js index d8cf610..9e9f4b9 100644 --- a/jquery.binding.js +++ b/jquery.binding.js @@ -27,8 +27,9 @@ * @returns {jQuery|*} */ $.fn.sortable = function (options) { - var retVal; - var callArgs = arguments; + var retVal, + args = arguments; + this.each(function () { var $el = $(this), sortable = $el.data('sortable'); @@ -47,14 +48,14 @@ $el.removeData('sortable'); } else if (typeof sortable[options] === 'function') { - retVal = sortable[options].apply(sortable, [].slice.call(callArgs, 1)); + retVal = sortable[options].apply(sortable, [].slice.call(args, 1)); } else if (options in sortable.options) { - retVal = sortable.option.apply(sortable, callArgs); + retVal = sortable.option.apply(sortable, args); } } }); return (retVal === void 0) ? this : retVal; }; -}); \ No newline at end of file +});