Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix(jqLite): use jQuery only if jQuery.fn.on present
Browse files Browse the repository at this point in the history
Make Angular not bind to jQuery versions older than 1.7 since older
versions of jQuery do not support necessary on()/off() methods.
  • Loading branch information
snapwich committed May 12, 2014
1 parent 7f5e0f0 commit e9bc51c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e9bc51c

Please sign in to comment.