I am trying to achieve an animation using pure JavaScript with DIV.
Code:
<body>
<form id="form1" runat="server">
<div>
<script language="javascript" type="text/javascript">
<!--
//This hides javaScript from old browsers
var width = 400;
var height = 200;
function ResizeDIV() {
width = width - 2;
height = height - 1;
var divElement = document.getElementById('div1');
divElement.style.width = width;
divElement.style.height = height;
}
setInterval('ResizeDIV()', 5000);
//-->
</script>
</div>
<div id="div1" class="divStyle">
hakdjaksdhajksdkasdkasdk
</div>
</form>
</body>
But this is not working.
How can I do that in most simplest way?