Team:UCLondon/Templates/Content-Slide
From 2012e.igem.org
(Difference between revisions)
Line 39: | Line 39: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | + | $('.slide a').click(function() { | |
- | + | ||
var hiddenDiv = $(this).parent().children('.caption').children('.interact'); | var hiddenDiv = $(this).parent().children('.caption').children('.interact'); | ||
var dispVal = hiddenDiv.css('display'); | var dispVal = hiddenDiv.css('display'); | ||
Line 46: | Line 45: | ||
if (dispVal == 'none'){ | if (dispVal == 'none'){ | ||
- | + | //animation | |
- | + | hiddenDiv.parent().animate({ | |
- | + | height: 80 | |
- | + | }, 5000, funtion(){ alert('increase'); }); | |
- | + | ||
- | + | ||
- | + | ||
- | + | hiddenDiv.css('display', 'block'); | |
} else { | } else { | ||
- | + | //animation | |
- | + | hiddenDiv.parent().animate({ | |
- | + | height: 30 | |
- | + | }, 5000, funtion(){ alert('increase'); }); | |
- | + | ||
- | + | ||
- | + | ||
- | + | hiddenDiv.css('display', 'none') | |
} | } | ||
- | return false; } ); | + | return false; |
+ | }); | ||
</script> | </script> | ||
</html> | </html> |
Revision as of 01:04, 15 September 2012