Team:ETH Zurich/tpl/read-more

From 2014.igem.org

(Difference between revisions)
 
(54 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
<script>
<script>
 +
$(document).ready(function(){
$(document).ready(function(){
-
  $("#hidesum").click(function(){
+
  var $p, $el, $ps, $up, $r, totalHeight;
-
    $(".summary").hide();
+
 
-
  });
+
   $(".carousel .read-more").click(function() {
-
   $("#showsum").click(function(){
+
-
    $(".summary").show();
+
totalHeight = 0
-
  });
+
 
-
});
+
$el = $(this);
-
$(document).ready(function(){
+
$p  = $el.parent();
-
  $("#hideback").click(function(){
+
$up = $p.parent();
-
    $(".background").hide();
+
$ps = $up.children();
-
  });
+
-
  $("#showback").click(function(){
+
$ps.each(function() {
-
    $(".background").show();
+
totalHeight += $(this).outerHeight();
-
  });
+
});
-
});
+
 
-
$(document).ready(function(){
+
totalHeight -= $p.height();
-
  $("#hidegoals").click(function(){
+
-
    $(".goals").hide();
+
$up
-
  });
+
.css({
-
  $("#showgoals").click(function(){
+
// Set height to prevent instant jumpdown when max height is removed
-
    $(".goals").show();
+
"height": $up.height(),
-
  });
+
"max-height": 999999
-
});
+
})
-
$(document).ready(function(){
+
.animate({
-
  $("#hideimp").click(function(){
+
"height": totalHeight + 280
-
    $(".implementation").hide();
+
});
-
  });
+
-
  $("#showimp").click(function(){
+
$p.fadeOut();
-
    $(".implementation").show();
+
-
  });
+
return false;
-
});
+
  });
-
$(document).ready(function(){
+
-
  $("#hidetools").click(function(){
+
-
    $(".tools").hide();
+
-
  });
+
-
  $("#showtools").click(function(){
+
-
    $(".tools").show();
+
-
  });
+
-
});
+
-
$(document).ready(function(){
+
-
  $("#hideapp").click(function(){
+
-
    $(".applications").hide();
+
-
  });
+
-
  $("#showapp").click(function(){
+
-
    $(".applications").show();
+
-
  });
+
});
});
 +
 +
</script>
</script>
-
 
+
</html>
-
<div class="inner1">
+
-
<header>
+
-
<h1><a href="#main" id="logo" class="scrolly">Overview</a></h1>
+
-
</header>
+
-
</div>
+
-
        <div class="inner2">
+
-
<html/>
+

Latest revision as of 18:20, 11 October 2014