Update title on pushState, closes #33
This commit is contained in:
parent
1107787f08
commit
1ae7872ed8
19 changed files with 60 additions and 20 deletions
|
@ -49,7 +49,12 @@ OSM.Search = function(map) {
|
|||
page.pushstate = page.popstate = function(path) {
|
||||
var params = querystring.parse(path.substring(path.indexOf('?') + 1));
|
||||
$("#query").val(params.query);
|
||||
$("#sidebar_content").load(path, page.load);
|
||||
$("#sidebar_content").load(path, function() {
|
||||
if (xhr.getResponseHeader('X-Page-Title')) {
|
||||
document.title = xhr.getResponseHeader('X-Page-Title');
|
||||
}
|
||||
page.load();
|
||||
});
|
||||
};
|
||||
|
||||
page.load = function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue