Revision: 50738
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 1, 2011 02:37 by i-am-andy
Initial Code
$(document).ready(function(){ bgImageTotal=20; randomNumber = Math.round(Math.random()*(bgImageTotal-1))+1; imgPath=('/my/image/path/'+randomNumber+'.jpg'); $('h1').css('background-image', ('url("'+imgPath+'")')); });
Initial URL
Initial Description
Really simple jQuery random image
Initial Title
jQuery random image
Initial Tags
image, jquery, background
Initial Language
jQuery