Team:ETH Zurich/tpl/read-more

From 2014.igem.org

(Difference between revisions)
 
(17 intermediate revisions not shown)
Line 5: Line 5:
   var $p, $el, $ps, $up, $r, totalHeight;
   var $p, $el, $ps, $up, $r, totalHeight;
-
   $(".carousel .button").click(function() {
+
   $(".carousel .read-more").click(function() {
totalHeight = 0
totalHeight = 0
Line 13: Line 13:
$up = $p.parent();
$up = $p.parent();
$ps = $up.children();
$ps = $up.children();
-
$r = $ps.find('.read-more' , '.forward' , '.backward');
 
$ps.each(function() {
$ps.each(function() {
-
totalHeight += $(this).height();
+
totalHeight += $(this).outerHeight();
-
});
+
-
+
-
$r.each(function() {
+
-
totalHeight -= $(this).height();
+
});
});
 +
 +
totalHeight -= $p.height();
$up
$up
Line 30: Line 27:
})
})
.animate({
.animate({
-
"height": totalHeight
+
"height": totalHeight + 280
});
});
Line 41: Line 38:
</script>
</script>
-
 
+
</html>
-
<div class="inner1">
+
-
<header>
+
-
<h1><a href="#main" id="logo" class="scrolly">Project Overview</a></h1>
+
-
</header>
+
-
</div>
+
-
        <div class="inner2">
+
-
<html/>
+

Latest revision as of 18:20, 11 October 2014