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 47: | ||
$(this).parent().children('.caption').animate({ | $(this).parent().children('.caption').animate({ | ||
- | height: | + | height: 300 |
- | }, | + | }, 500, function() { |
// Animation complete. | // Animation complete. | ||
}); | }); | ||
Line 54: | Line 55: | ||
} else { | } else { | ||
+ | $(this).parent().children('.caption').animate({ | ||
+ | height: 30 | ||
+ | }, 500, function() { | ||
+ | // Animation complete. | ||
+ | }); | ||
+ | |||
+ | |||
+ | |||
hiddenDiv.css('display', 'none'); | hiddenDiv.css('display', 'none'); | ||
Line 61: | Line 70: | ||
return false; | return false; | ||
}); | }); | ||
+ | |||
</script> | </script> | ||
</html> | </html> |
Revision as of 01:16, 15 September 2012