mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-03 09:05:37 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user