Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- var images = ['bg1.jpg', 'bg2.jpg', 'bg3.jpg', 'bg4.jpg', 'bg5.jpg', 'bg6.jpg'];
- $('body').css({'background-image': 'url(images/' + images[Math.floor(Math.random() * images.length)] + ')'});
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement