change current page after ajaxify:start event

This commit is contained in:
barisusakli
2015-03-07 21:59:21 -05:00
parent a5bf991cf0
commit e5dc408ef5

View File

@@ -59,10 +59,11 @@ $(document).ready(function() {
url = ajaxify.removeRelativePath(url.replace(/\/$/, '')); url = ajaxify.removeRelativePath(url.replace(/\/$/, ''));
var hash = window.location.hash; var hash = window.location.hash;
search = search || ''; search = search || '';
ajaxify.currentPage = url;
$(window).trigger('action:ajaxify.start', {url: url}); $(window).trigger('action:ajaxify.start', {url: url});
ajaxify.currentPage = url;
if (window.history && window.history.pushState) { if (window.history && window.history.pushState) {
window.history[!quiet ? 'pushState' : 'replaceState']({ window.history[!quiet ? 'pushState' : 'replaceState']({
url: url + search + hash url: url + search + hash