Team:ETH Zurich/tpl/read-more

From 2014.igem.org

(Difference between revisions)
(Created page with "<html> <body class="left-sidebar"> <div id="header"> <div class="inner2"> <header> <h1><a href="#main" id="logo" class="scrolly">Project overview</a></h1> </header> ...")
 
(69 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
-
<body class="left-sidebar">
+
<script>
-
<div id="header">
+
 
-
<div class="inner2">
+
$(document).ready(function(){
-
<header>
+
  var $p, $el, $ps, $up, $r, totalHeight;
-
<h1><a href="#main" id="logo" class="scrolly">Project overview</a></h1>
+
 
-
</header>
+
  $(".carousel .read-more").click(function() {
-
</div>
+
-
<nav id="nav"></html>{{:Team:ETH Zurich/tpl/menu}}<html></nav>
+
totalHeight = 0
-
        <div class="wrapper style1">
+
 
-
    <div class="container">
+
$el = $(this);
-
<html/>
+
$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>
 +
</html>

Latest revision as of 18:20, 11 October 2014