Skip to content

Instantly share code, notes, and snippets.

@veryrobert
Created September 16, 2013 16:13
Show Gist options
  • Save veryrobert/6582824 to your computer and use it in GitHub Desktop.
Save veryrobert/6582824 to your computer and use it in GitHub Desktop.
Quick javascript tool for random image placement
$('.images').each(function(i,el){
var tLeft = Math.floor(Math.random()*960),
tTop = Math.floor(Math.random()*1000);
console.log('left =' + tLeft);
$(el).css({left:tLeft, top: tTop});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment