Handle back & forward events

This commit is contained in:
Dmitriy Zaporozhets 2011-12-20 08:39:14 +02:00
parent 321dbb7bac
commit f80745b7db
4 changed files with 13 additions and 16 deletions

View file

@ -50,9 +50,17 @@ $(document).ready(function(){
e.preventDefault();
}
});
});
if (history && history.pushState) {
$(function() {
$(window).bind("popstate", function() {
$.getScript(location.href);
});
});
}
function focusSearch() {
$("#search").focus();
}