Skip to content

Commit

Permalink
#22: Fix title not updating on the back button
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Ángel Pérez committed Aug 12, 2014
1 parent 5d60c74 commit 53083f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jquery.smoothState.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,7 @@

if(!isPopped) {
history.pushState({ id: $container.prop('id') }, cache[url].title, url);
document.title = cache[url].title;
}

$container.data('smoothState').href = url;
},

/** Loading, wait 10 ms and check again */
Expand Down Expand Up @@ -387,9 +384,12 @@
var containerId = '#' + $container.prop('id'),
$content = utility.getContentById(containerId, cache[url].html);


if($content) {
// Call the onEnd callback and set trigger
document.title = cache[url].title;
$container.data('smoothState').href = url;

// Call the onEnd callback and set trigger
options.onEnd.render(url, $container, $content);

$container.one("ss.onEndEnd", function(){
Expand Down

0 comments on commit 53083f8

Please sign in to comment.