added permalinks

This commit is contained in:
FezVrasta 2014-12-01 16:01:15 +01:00
parent b889eb6549
commit 9d2cbbb9b4

View File

@ -800,7 +800,13 @@
<!-- Open source code --> <!-- Open source code -->
<script> <script>
window.page = "#about"; window.page = window.location.hash || "#about";
$(document).ready(function() {
if (window.page != "#about") {
$(".menu").find("li[data-target=" + window.page + "]").trigger("click");
}
});
$(window).on("resize", function() { $(window).on("resize", function() {
$("html, body").height($(window).height()); $("html, body").height($(window).height());
@ -814,6 +820,7 @@
$(this).addClass("active"); $(this).addClass("active");
window.page = $(this).data("target"); window.page = $(this).data("target");
var page = $(window.page); var page = $(window.page);
window.location.hash = window.page;
$(".page").not(page).removeClass("active").hide(); $(".page").not(page).removeClass("active").hide();
page.show(); page.show();
setTimeout(function() { setTimeout(function() {