Skip to content

Commit 16bcd42

Browse files
committed
bumping jquery to 1.7+
1 parent e16c762 commit 16bcd42

File tree

4 files changed

+3943
-3737
lines changed

4 files changed

+3943
-3737
lines changed

backbone.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,9 +1099,9 @@
10991099
// Depending on whether we're using pushState or hashes, and whether
11001100
// 'onhashchange' is supported, determine how we check the URL state.
11011101
if (this._hasPushState) {
1102-
Backbone.$(window).bind('popstate', this.checkUrl);
1102+
Backbone.$(window).on('popstate', this.checkUrl);
11031103
} else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) {
1104-
Backbone.$(window).bind('hashchange', this.checkUrl);
1104+
Backbone.$(window).on('hashchange', this.checkUrl);
11051105
} else if (this._wantsHashChange) {
11061106
this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
11071107
}
@@ -1133,7 +1133,7 @@
11331133
// Disable Backbone.history, perhaps temporarily. Not useful in a real app,
11341134
// but possibly useful for unit testing Routers.
11351135
stop: function() {
1136-
Backbone.$(window).unbind('popstate', this.checkUrl).unbind('hashchange', this.checkUrl);
1136+
Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);
11371137
clearInterval(this._checkUrlInterval);
11381138
History.started = false;
11391139
},
@@ -1325,9 +1325,9 @@
13251325
method = _.bind(method, this);
13261326
eventName += '.delegateEvents' + this.cid;
13271327
if (selector === '') {
1328-
this.$el.bind(eventName, method);
1328+
this.$el.on(eventName, method);
13291329
} else {
1330-
this.$el.delegate(selector, eventName, method);
1330+
this.$el.on(eventName, selector, method);
13311331
}
13321332
}
13331333
},
@@ -1336,7 +1336,7 @@
13361336
// You usually don't need to use this, but may wish to if you have multiple
13371337
// Backbone views attached to the same DOM element.
13381338
undelegateEvents: function() {
1339-
this.$el.unbind('.delegateEvents' + this.cid);
1339+
this.$el.off('.delegateEvents' + this.cid);
13401340
},
13411341

13421342
// Performs the initial configuration of a View with a set of options.

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,12 +570,12 @@ <h2 id="downloads">
570570

571571
<p>
572572
Backbone's only hard dependency is either
573-
<a href="http://underscorejs.org/">Underscore.js</a> <small>( > 1.4.3)</small> or
573+
<a href="http://underscorejs.org/">Underscore.js</a> <small>( >= 1.4.3)</small> or
574574
<a href="http://lodash.com">Lo-Dash</a>.
575575
For RESTful persistence, history support via <a href="#Router">Backbone.Router</a>
576576
and DOM manipulation with <a href="#View">Backbone.View</a>, include
577577
<a href="https://github.com/douglascrockford/JSON-js">json2.js</a>, and either
578-
<a href="http://jquery.com">jQuery</a> <small>( > 1.4.2)</small> or
578+
<a href="http://jquery.com">jQuery</a> <small>( >= 1.7.0)</small> or
579579
<a href="http://zeptojs.com/">Zepto</a>.
580580
</p>
581581

@@ -2578,7 +2578,7 @@ <h2 id="View">Backbone.View</h2>
25782578
<p id="View-delegateEvents">
25792579
<b class="header">delegateEvents</b><code>delegateEvents([events])</code>
25802580
<br />
2581-
Uses jQuery's <tt>delegate</tt> function to provide declarative callbacks
2581+
Uses jQuery's <tt>on</tt> function to provide declarative callbacks
25822582
for DOM events within a view.
25832583
If an <b>events</b> hash is not passed directly, uses <tt>this.events</tt>
25842584
as the source. Events are written in the format <tt>{"event selector": "callback"}</tt>.

test/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>Backbone Test Suite</title>
66
<link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen">
77
<script src="vendor/json2.js"></script>
8-
<script src="vendor/jquery-1.7.1.js"></script>
8+
<script src="vendor/jquery-1.8.3.js"></script>
99
<script src="vendor/qunit.js"></script>
1010
<script src="vendor/underscore.js"></script>
1111
<script src="../backbone.js"></script>

0 commit comments

Comments
 (0)