From e9bc51cb0964ea682c1654919174dacebd09fcf6 Mon Sep 17 00:00:00 2001 From: Rich Snapp Date: Thu, 20 Feb 2014 16:49:27 -0700 Subject: [PATCH] fix(jqLite): use jQuery only if jQuery.fn.on present Make Angular not bind to jQuery versions older than 1.7 since older versions of jQuery do not support necessary on()/off() methods. --- src/Angular.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Angular.js b/src/Angular.js index e952bfbb..85601918 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -1433,9 +1433,9 @@ function bindJQuery() { var originalCleanData; // bind to jQuery if present; jQuery = window.jQuery; - - // reset to jQuery or default to us. - if (jQuery) { + // Use jQuery if it exists with proper functionality, otherwise default to us. + // Angular 1.2+ requires jQuery 1.7.1+ for on()/off() support. + if (jQuery && jQuery.fn.on) { jqLite = jQuery; extend(jQuery.fn, { scope: JQLitePrototype.scope,