Team:UNITN-Trento/JS/Parts
From 2013.igem.org
(Difference between revisions)
Line 3: | Line 3: | ||
scroll = $("#tn-main-wrap-wrap").scrollTop(); | scroll = $("#tn-main-wrap-wrap").scrollTop(); | ||
height = $(".tn-parts.container .content").css('height'); | height = $(".tn-parts.container .content").css('height'); | ||
+ | margin = $(".tn-parts-container .menu").css('margin-top'); | ||
if(height >= scroll) { margin = scroll; } | if(height >= scroll) { margin = scroll; } | ||
$(".tn-parts-container .menu").css({'margin-top' : margin}); | $(".tn-parts-container .menu").css({'margin-top' : margin}); | ||
}); | }); | ||
}); | }); |
Revision as of 12:43, 19 September 2013
$(document).ready(function() { oSch(function() { scroll = $("#tn-main-wrap-wrap").scrollTop(); height = $(".tn-parts.container .content").css('height'); margin = $(".tn-parts-container .menu").css('margin-top'); if(height >= scroll) { margin = scroll; } $(".tn-parts-container .menu").css({'margin-top' : margin}); }); });