Permalink
Browse files

bumping jquery to 1.7+

  • Loading branch information...
1 parent e16c762 commit 16bcd429c8f83cc445bc133418a2ed5bc97fda98 @tgriesser tgriesser committed Dec 22, 2012
Showing with 3,943 additions and 3,737 deletions.
  1. +6 −6 backbone.js
  2. +3 −3 index.html
  3. +1 −1 test/index.html
  4. +3,933 −3,727 test/vendor/{jquery-1.7.1.js → jquery-1.8.3.js}
View
@@ -1099,9 +1099,9 @@
// Depending on whether we're using pushState or hashes, and whether
// 'onhashchange' is supported, determine how we check the URL state.
if (this._hasPushState) {
- Backbone.$(window).bind('popstate', this.checkUrl);
+ Backbone.$(window).on('popstate', this.checkUrl);
} else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) {
- Backbone.$(window).bind('hashchange', this.checkUrl);
+ Backbone.$(window).on('hashchange', this.checkUrl);
} else if (this._wantsHashChange) {
this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
}
@@ -1133,7 +1133,7 @@
// Disable Backbone.history, perhaps temporarily. Not useful in a real app,
// but possibly useful for unit testing Routers.
stop: function() {
- Backbone.$(window).unbind('popstate', this.checkUrl).unbind('hashchange', this.checkUrl);
+ Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);
clearInterval(this._checkUrlInterval);
History.started = false;
},
@@ -1325,9 +1325,9 @@
method = _.bind(method, this);
eventName += '.delegateEvents' + this.cid;
if (selector === '') {
- this.$el.bind(eventName, method);
+ this.$el.on(eventName, method);
} else {
- this.$el.delegate(selector, eventName, method);
+ this.$el.on(eventName, selector, method);
}
}
},
@@ -1336,7 +1336,7 @@
// You usually don't need to use this, but may wish to if you have multiple
// Backbone views attached to the same DOM element.
undelegateEvents: function() {
- this.$el.unbind('.delegateEvents' + this.cid);
+ this.$el.off('.delegateEvents' + this.cid);
},
// Performs the initial configuration of a View with a set of options.
View
@@ -570,12 +570,12 @@ <h2 id="downloads">
<p>
Backbone's only hard dependency is either
- <a href="http://underscorejs.org/">Underscore.js</a> <small>( > 1.4.3)</small> or
+ <a href="http://underscorejs.org/">Underscore.js</a> <small>( >= 1.4.3)</small> or
<a href="http://lodash.com">Lo-Dash</a>.
For RESTful persistence, history support via <a href="#Router">Backbone.Router</a>
and DOM manipulation with <a href="#View">Backbone.View</a>, include
<a href="https://github.com/douglascrockford/JSON-js">json2.js</a>, and either
- <a href="http://jquery.com">jQuery</a> <small>( > 1.4.2)</small> or
+ <a href="http://jquery.com">jQuery</a> <small>( >= 1.7.0)</small> or
<a href="http://zeptojs.com/">Zepto</a>.
</p>
@@ -2578,7 +2578,7 @@ <h2 id="View">Backbone.View</h2>
<p id="View-delegateEvents">
<b class="header">delegateEvents</b><code>delegateEvents([events])</code>
<br />
- Uses jQuery's <tt>delegate</tt> function to provide declarative callbacks
+ Uses jQuery's <tt>on</tt> function to provide declarative callbacks
for DOM events within a view.
If an <b>events</b> hash is not passed directly, uses <tt>this.events</tt>
as the source. Events are written in the format <tt>{"event selector": "callback"}</tt>.
View
@@ -5,7 +5,7 @@
<title>Backbone Test Suite</title>
<link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen">
<script src="vendor/json2.js"></script>
- <script src="vendor/jquery-1.7.1.js"></script>
+ <script src="vendor/jquery-1.8.3.js"></script>
<script src="vendor/qunit.js"></script>
<script src="vendor/underscore.js"></script>
<script src="../backbone.js"></script>
Oops, something went wrong.

0 comments on commit 16bcd42

Please sign in to comment.