Team:ETH Zurich/tpl/read-more

From 2014.igem.org

(Difference between revisions)
 
(59 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>
-
<body class="left-sidebar">
 
-
<div id="header">
 
-
<div class="inner2">
 
-
<header>
 
-
<h1>Project Overview</h1>
 
-
</header>
 
-
</div>
 
-
<nav id="nav"></html>{{:Team:ETH Zurich/tpl/menu}}<html></nav>
 
-
        <div class="wrapper style1">
 
-
    <div class="container">
 
-
                        <div class="row" id="top">
 
-
                            <reel>
 
</html>
</html>

Latest revision as of 18:20, 11 October 2014