Team:ETH Zurich/tpl/read-more
From 2014.igem.org
(Difference between revisions)
(27 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
<html> | <html> | ||
<script> | <script> | ||
- | |||
- | |||
$(document).ready(function(){ | $(document).ready(function(){ | ||
- | $(".carousel . | + | var $p, $el, $ps, $up, $r, totalHeight; |
+ | |||
+ | $(".carousel .read-more").click(function() { | ||
totalHeight = 0 | totalHeight = 0 | ||
Line 17: | Line 17: | ||
totalHeight += $(this).outerHeight(); | totalHeight += $(this).outerHeight(); | ||
}); | }); | ||
+ | |||
+ | totalHeight -= $p.height(); | ||
$up | $up | ||
Line 25: | Line 27: | ||
}) | }) | ||
.animate({ | .animate({ | ||
- | "height": totalHeight | + | "height": totalHeight + 280 |
}); | }); | ||
Line 36: | Line 38: | ||
</script> | </script> | ||
- | + | </html> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + |
Latest revision as of 18:20, 11 October 2014