<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.js" type="text/javascript"></script>
<script type="text/javascript"> $(document).ready(function () { var backgroundColor = "gray"; function animateButton() { $("#Button1").animate({ width: 155 }, 1000, function () { $(this).css("background-color", backgroundColor); backgroundColor == "gray" ? backgroundColor = "red" : backgroundColor = "gray"; setTimeout(animateButton, 3000); } ); } setTimeout(animateButton, 3000); }); </script>
Attachment: button.zip