Click to expand, then click again to shrink - Its expanding, just not
shrinking
I have a div that expands to show the content once users click onto the
div itself. The div is animated using javascript to it is a little slicker
than immediately changing from small to large in a single click.
I have it expanding, just not shrinking again - no matter how much i
change the coding.
Clues?
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("#statExp").click(function(){
$("#statExp").animate({height:'100px'});
});
});
</script>
<div id="statExp"
style="background:#98bf21;height:20px;width:450px;position:relative;overflow:hidden;"></div>
No comments:
Post a Comment