Difference between revisions of "Template:Team:Bielefeld-CeBiTec/JS"

(updated "story")
(updated zoom feature and added new design)
Line 100: Line 100:
 
});
 
});
  
$(window).on('load', function() {
+
$(window).on('load', function() {
 +
//recolor contentboxes
 +
$('.contentbox').each(function(i, obj) {
 +
$color = "#eeeeee";
 +
if ((i % 2) == 1) {
 +
$color = "#FFFFFF";
 +
}
 +
$content = $(obj).children(".content");
 +
$(obj).css("background", $color);
 +
$content.css("background", $color);
 +
});
 +
 
hideNavbars();
 
hideNavbars();
 
if ($(document).scrollTop() == 0) {
 
if ($(document).scrollTop() == 0) {
Line 111: Line 122:
 
$("#cover-set").hide();
 
$("#cover-set").hide();
 
$("#cover").css({"background":"rgba(0, 0, 0, 0.5)"});
 
$("#cover").css({"background":"rgba(0, 0, 0, 0.5)"});
$("#cover-box").css({"background":"rgba(255, 0, 255, 1)"});
+
$("#cover-box").css({"background":"rgba(255, 255, 255, 1)"});
 
$("#cover-box-img").css({"background":"rgba(255, 255, 255, 1)"});
 
$("#cover-box-img").css({"background":"rgba(255, 255, 255, 1)"});
 
$("#cover-box-text").css({"background":"rgba(255, 255, 255, 1)"});
 
$("#cover-box-text").css({"background":"rgba(255, 255, 255, 1)"});
Line 491: Line 502:
 
$("#cover-p").html($p.html());
 
$("#cover-p").html($p.html());
 
$(".cover").fadeIn(200);
 
$(".cover").fadeIn(200);
$(".test").html($size);
+
 +
 +
$topPos = $("#cover-box").position().top;
 +
$(".test").html($("#cover-box").height());
 +
$topPos = $("#cover-box").height() * 0.5 + 30 + "px";
 +
$("#cover-box").css("top", $topPos);
 
     });
 
     });
 
});
 
});

Revision as of 16:36, 30 September 2017