Team:Heidelberg/Team

From 2013.igem.org

(Difference between revisions)
m
m
Line 7: Line 7:
<!-- Teammembers -->
<!-- Teammembers -->
-
<div class="container" id="picscontainer" style="height:500px;position:relative;padding: 170px 150px 170px 150px">
+
<div class="container" id="picscontainer" style="height:500px;position:relative;padding: 170px 150px 170px 150px;max-width:99%;">
     <div id="memberdesc" class="panel panel-danger" style="margin:3%; max-width:100%; max-height:100%;display:none">
     <div id="memberdesc" class="panel panel-danger" style="margin:3%; max-width:100%; max-height:100%;display:none">
         <div class="panel-heading"><h3></h3></div>
         <div class="panel-heading"><h3></h3></div>
Line 110: Line 110:
     var images = $('.teamimage');
     var images = $('.teamimage');
     var picsperside = getPicsPerSide();
     var picsperside = getPicsPerSide();
-
     var height = picsperside.h * 170;
+
     var height = picsperside.v * 170;
     var width = $('#picscontainer').height(height).width();
     var width = $('#picscontainer').height(height).width();
     images.click(function(e){
     images.click(function(e){
-
         stopAnimation();
+
         if (animated)
 +
            stopAnimation();
         var panel = $('#memberdesc');
         var panel = $('#memberdesc');
         panel.find("h3").empty().text($(e.delegateTarget).attr("data-name"));
         panel.find("h3").empty().text($(e.delegateTarget).attr("data-name"));
Line 160: Line 161:
     var w = $("#picscontainer").innerWidth();
     var w = $("#picscontainer").innerWidth();
     var currpic = 0;
     var currpic = 0;
-
     var wdiff = (w - picsperside.v * 150) / (picsperside.v - 1)
+
     var wdiff = (w - picsperside.h * 150) / (picsperside.h - 1)
-
     var rightmost = (picsperside.v - 1) * (150 + wdiff);
+
     var rightmost = (picsperside.h - 1) * (150 + wdiff);
-
     for (var i = 0; i < picsperside.v; ++i, ++currpic) {
+
     for (var i = 0; i < picsperside.h; ++i, ++currpic) {
         $(images[currpic]).css({"left": '', "top": '', "right": '', "bottom": ''});
         $(images[currpic]).css({"left": '', "top": '', "right": '', "bottom": ''});
         $(images[currpic]).animate({"left": i * (150 + wdiff), "top": 0});
         $(images[currpic]).animate({"left": i * (150 + wdiff), "top": 0});
     }
     }
-
     for (var i = 1; i < picsperside.h; ++i, ++currpic) {
+
     for (var i = 1; i < picsperside.v - 1; ++i, ++currpic) {
         $(images[currpic]).css({"left": '', "top": '', "right": '', "bottom": ''});
         $(images[currpic]).css({"left": '', "top": '', "right": '', "bottom": ''});
         $(images[currpic]).animate({"left": 0, "top": i * 170});
         $(images[currpic]).animate({"left": 0, "top": i * 170});
         }
         }
-
     for (var i = 1; i < picsperside.h; ++i, ++currpic){
+
     for (var i = 1; i < picsperside.v - 1; ++i, ++currpic){
         $(images[currpic]).css({"left": '', "top": '', "right": '', "bottom": ''});
         $(images[currpic]).css({"left": '', "top": '', "right": '', "bottom": ''});
         $(images[currpic]).animate({"left": rightmost, "top": i * 170});
         $(images[currpic]).animate({"left": rightmost, "top": i * 170});

Revision as of 19:42, 4 October 2013