I set up this fiddle with an issue I am encountering. I need the script to hide the button that was clicked after the animation is complete. What is the correct way to do this?
http://jsfiddle.net/digitalaxis/utJKU/
HTML:
<div>
<a id='button1' href="#">Button 1</a>
<a id='button2' href="#">Button 2</a>
<a id='button3' href="#">Button 3</a>
<a id='button4' href="#">Button 4</a>
<a id='button5' href="#">Button 5</a>
</div>
<div id="box">
Some element
</div>
JS:
$('a[id^="button"]').click(function() {
$('#box').hide('slow', function() {
$('a').hide('slow');
});
});