Team:Heidelberg/js/frontpage
From 2014.igem.org
(Difference between revisions)
Line 12: | Line 12: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
- | |||
recalcRingSize(true); | recalcRingSize(true); | ||
+ | //var ring = $("#ring"); | ||
+ | //ring. | ||
+ | skrollr.init(); | ||
}); | }); | ||
Revision as of 10:09, 22 September 2014
recalcRingSize = function(setPosition) { var placeholder = $("#img-placeholder"); var ring = $("#ring"); var width = placeholder.outerWidth(false); if(!setPosition){
var position = placeholder.offset(); ring = ring.css(position);
} ring.css("width", width+"px"); placeholder.css("height", ring.height()+"px"); };
$(document).ready(function(){ recalcRingSize(true); //var ring = $("#ring"); //ring. skrollr.init(); });
$( window ).resize(function() { recalcRingSize(false); });