Team:SDU-Denmark/core/header
From 2013.igem.org
(Difference between revisions)
Heidi.Wille (Talk | contribs) |
Heidi.Wille (Talk | contribs) |
||
Line 7: | Line 7: | ||
var viewportHeight = $(window).height(); | var viewportHeight = $(window).height(); | ||
var totalPageHeight = $(document).height(); | var totalPageHeight = $(document).height(); | ||
- | |||
- | |||
- | |||
- | |||
var window_top = $(window).scrollTop(); | var window_top = $(window).scrollTop(); | ||
var div_top = $('#sticky-anchor').offset().top; | var div_top = $('#sticky-anchor').offset().top; | ||
if (window_top > div_top) { | if (window_top > div_top) { | ||
$('.top').addClass('stick'); | $('.top').addClass('stick'); | ||
+ | $(".topMargin").css("margin-top", "105px"); | ||
} else { | } else { | ||
$('.top').removeClass('stick'); | $('.top').removeClass('stick'); | ||
+ | $(".topMargin").css("margin-top", "25px"); | ||
} | } | ||
} | } |
Revision as of 16:26, 10 August 2013