Team:ETH Zurich/tpl/read-more

From 2014.igem.org

(Difference between revisions)
 
(61 intermediate revisions not shown)
Line 3: Line 3:
$(document).ready(function(){
$(document).ready(function(){
-
   $("#hide").click(function(){
+
  var $p, $el, $ps, $up, $r, totalHeight;
-
    $("section").hide();
+
 
-
  });
+
   $(".carousel .read-more").click(function() {
-
  $("#show").click(function(){
+
-
    $("section").show();
+
totalHeight = 0
-
  });
+
 
 +
$el = $(this);
 +
$p  = $el.parent();
 +
$up = $p.parent();
 +
$ps = $up.children();
 +
 +
$ps.each(function() {
 +
totalHeight += $(this).outerHeight();
 +
});
 +
 
 +
totalHeight -= $p.height();
 +
 +
$up
 +
.css({
 +
// Set height to prevent instant jumpdown when max height is removed
 +
"height": $up.height(),
 +
"max-height": 999999
 +
})
 +
.animate({
 +
"height": totalHeight + 280
 +
});
 +
 +
$p.fadeOut();
 +
 +
return false;
 +
  });
});
});
 +
 +
</script>
</script>
-
<body class="left-sidebar">
 
-
<div id="header">
 
-
<div class="inner2">
 
-
<header>
 
-
<h1><a href="#main" id="logo" class="scrolly">Project Overview</a></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