Hello. I'm looking to use jQuery to load Divs with random margins effecting the css. Below is the script I'm attempting use, trying to create a number random from 1-500, and loading that as the margin. But I'm not a jQuery wiz, and I'm missing something.
Thanks so much for the help!
<script type="text/javascript">
$(function(){
$("#randomnumber").load(function() {
var numRand = Math.floor(Math.random()*501);
$("#randomnumber").css("marginRight",numRand);
});
});
</script>
<div id="page-wrap">
<div id="randomnumber">BIG BOY</div>
</div>