Team:TU Munich/Templates/Layout
From 2010.igem.org
(Difference between revisions)
Hartlmueller (Talk | contribs) |
Hartlmueller (Talk | contribs) |
||
Line 6: | Line 6: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
- | + | //Hide (Collapse) the toggle containers on load | |
- | $(".toggle_container").hide(); | + | $(".toggle_container").hide(); |
- | + | //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state) | |
$("h2.trigger").click(function(){ | $("h2.trigger").click(function(){ | ||
$(this).toggleClass("active").next().slideToggle("slow"); | $(this).toggleClass("active").next().slideToggle("slow"); | ||
+ | return false; //Prevent the browser jump to the link anchor | ||
}); | }); | ||
- | |||
}); | }); | ||
</script> | </script> |