Skip to content

Commit

Permalink
bumping jquery to 1.7+
Browse files Browse the repository at this point in the history
  • Loading branch information
tgriesser committed Dec 22, 2012
1 parent e16c762 commit 16bcd42
Show file tree
Hide file tree
Showing 4 changed files with 3,943 additions and 3,737 deletions.
12 changes: 6 additions & 6 deletions backbone.js
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
},
Expand Down Expand Up @@ -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);
}
}
},
Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions index.html
Expand Up @@ -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>

Expand Down Expand Up @@ -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>.
Expand Down
2 changes: 1 addition & 1 deletion test/index.html
Expand Up @@ -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>
Expand Down

0 comments on commit 16bcd42

Please sign in to comment.