Skip to content

Commit

Permalink
Merge pull request #115 from ianthe/master
Browse files Browse the repository at this point in the history
LIB001-1594: Syncing changes
  • Loading branch information
ianthe authored Feb 22, 2017
2 parents 9c34831 + e270c6c commit 029b559
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
7 changes: 7 additions & 0 deletions assets/imagesloaded/imagesloaded.pkgd.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion assets/script/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ var events = function () {

$(document).ready(function(){




$("#main-image").load(function() {

// set metadata width according to main-image width
Expand Down Expand Up @@ -166,6 +169,15 @@ $("#main-image").load(function() {
$('.footer-margin').css('height', footerMargin + 'px');
}

var offset = $(':target').offset();
var scrollto = offset.top - 100; // minus fixed header height
$('html, body').animate({scrollTop:scrollto}, 0);

var shiftWindow = function() { scrollBy(0, -500) };
if (location.hash) shiftWindow();
window.addEventListener("hashchange", shiftWindow);


});

// Javascript to enable link to tab
Expand All @@ -178,4 +190,4 @@ if (hash) {
// Change hash for page-reload
$('.nav-tabs a').on('shown', function (e) {
window.location.hash = e.target.hash.replace("#", "#" + prefix);
});
});

0 comments on commit 029b559

Please sign in to comment.