Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

4 participants

OZAWA Sakuro Oriol Gual Chew Choon Keat Joshua Peek
OZAWA Sakuro

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

Chew Choon Keat

+1 bug fix

Joshua Peek
Collaborator

Makes sense.

Joshua Peek josh referenced this pull request
Closed

Fragment Title Updates #74

Joshua Peek josh merged commit 13fbfde into from
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
3  jquery.pjax.js
View
@@ -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.