We would like to know how to set top property value.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
$(window).load(function(){<!-- ww w .j av a 2 s.com-->
var var_top = 300;
$( ".ball" ).css( { top : "+=" + var_top + 'px'});
});
</script>
</head>
<body>
<div style="position: relative">
<div style="position: absolute; top: 200px" class="ball">
something</div>
</div>
</body>
</html>
The code above is rendered as follows: