mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-14 01:17:54 -05:00
bumping jquery to 1.7+
This commit is contained in:
12
backbone.js
12
backbone.js
@@ -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.
|
||||
|
||||
@@ -570,12 +570,12 @@
|
||||
|
||||
<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 @@ $("#make-demo").append(el);
|
||||
<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>.
|
||||
|
||||
@@ -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>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user