Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Assign document.title after examining attributes in the response. #62

Merged
merged 1 commit into from

4 participants

@sakuro

The assignment to document.title should be placed here, or we cannot assign it from attributes.

@choonkeat

+1 bug fix

@josh
Collaborator

Makes sense.

@josh josh referenced this pull request
Closed

Fragment Title Updates #74

@josh josh merged commit 13fbfde into defunkt:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  jquery.pjax.js
View
3  jquery.pjax.js
@@ -118,13 +118,14 @@ var pjax = $.pjax = function( options ) {
// the page's title.
var oldTitle = document.title,
title = $.trim( this.find('title').remove().text() )
- if ( title ) document.title = title
// No <title>? Fragment? Look for data-title and title attributes.
if ( !title && options.fragment ) {
title = $fragment.attr('title') || $fragment.data('title')
}
+ if ( title ) document.title = title
+
var state = {
pjax: options.container,
fragment: options.fragment,
Something went wrong with that request. Please try again.