Team:Heidelberg/js/frontpage
From 2014.igem.org
(Difference between revisions)
Line 19: | Line 19: | ||
$( window ).resize(function() { | $( window ).resize(function() { | ||
recalcRingSize(false); | recalcRingSize(false); | ||
+ | alert("Hallo!"); | ||
}); | }); |
Revision as of 11:45, 22 September 2014
recalcRingSize = function(setPosition) { var placeholder = $("#img-placeholder"); var ring = $("#ring"); var width = placeholder.outerWidth(false); var position = placeholder.offset(); if(!setPosition){
ring = ring.css(position);
} ring.attr("data-start", "transform:rotate(0deg);left:"+position.left+"px"); ring.css("width", width+"px"); placeholder.css("height", ring.height()+"px"); };
$(document).ready(function(){ recalcRingSize(true); skrollr.init(); });
$( window ).resize(function() { recalcRingSize(false); alert("Hallo!"); });