Skip to content

Commit

Permalink
Merge pull request #185 from defunkt/remove-deprecated-events
Browse files Browse the repository at this point in the history
Remove deprecated events
  • Loading branch information
chris123457 committed Sep 11, 2012
2 parents c39e995 + d0ddfc8 commit 99ad673
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions jquery.pjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ function pjax(options) {
fire('pjax:complete', [xhr, textStatus, options])

fire('pjax:end', [xhr, options])
// end.pjax is deprecated
fire('end.pjax', [xhr, options])
}

options.error = function(xhr, textStatus, errorThrown) {
Expand Down Expand Up @@ -325,9 +323,6 @@ function pjax(options) {
var xhr = pjax.xhr = $.ajax(options)

if (xhr.readyState > 0) {
// pjax event is deprecated
$(document).trigger('pjax', [xhr, options])

if (options.push && !options.replace) {
// Cache current container element before replacing it
cachePush(pjax.state.id, context.clone().contents())
Expand All @@ -336,9 +331,6 @@ function pjax(options) {
}

fire('pjax:start', [xhr, options])
// start.pjax is deprecated
fire('start.pjax', [xhr, options])

fire('pjax:send', [xhr, options])
}

Expand Down Expand Up @@ -409,19 +401,13 @@ function onPjaxPopstate(event) {
}

if (contents) {
// pjax event is deprecated
$(document).trigger('pjax', [null, options])
container.trigger('pjax:start', [null, options])
// end.pjax event is deprecated
container.trigger('start.pjax', [null, options])

if (state.title) document.title = state.title
container.html(contents)
pjax.state = state

container.trigger('pjax:end', [null, options])
// end.pjax event is deprecated
container.trigger('end.pjax', [null, options])
} else {
pjax(options)
}
Expand Down

0 comments on commit 99ad673

Please sign in to comment.