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.
This commit is contained in:
Rich Snapp
2014-02-20 16:49:27 -07:00
parent 7f5e0f0bd0
commit e9bc51cb09

View File

@@ -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,