Team:Heidelberg/js/frontpage

From 2014.igem.org

(Difference between revisions)
Line 1: Line 1:
$(document).ready(function(){
$(document).ready(function(){
skrollr.init();
skrollr.init();
-
var width = $("#img-placeholder").outerWidth(false);
+
var placeholder = $("#img-placeholder");
-
var position = $(element).offset();
+
var ring = $("#ring");
-
$("#ring").css("width", width).css(position);
+
var width = placeholder.outerWidth(false);
-
$("#img-placeholder").css("height", $("#ring").height()+"px");
+
var position = placeholder.offset();
 +
ring.css("width", width).css(position);
 +
placeholder.css("height", ring.height()+"px");
});
});

Revision as of 09:52, 22 September 2014

$(document).ready(function(){ skrollr.init(); var placeholder = $("#img-placeholder"); var ring = $("#ring"); var width = placeholder.outerWidth(false); var position = placeholder.offset(); ring.css("width", width).css(position); placeholder.css("height", ring.height()+"px"); });