-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
24 lines (22 loc) · 736 Bytes
/
script.js
File metadata and controls
24 lines (22 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(function haunt(){
setTimeout(function(){
$ghost = $('<div/>').css({
'width':'236px',
'height':'279px',
'background-image':"url('https://openmerchantaccount.com/img2/ghost.gif')",
'background-size':'236px 279px'
});
var posx = (Math.random() * ($(document).width())).toFixed();
var posy = (Math.random() * ($(document).height())).toFixed();
$ghost.css({
'position':'absolute',
'left':posx+'px',
'top':posy+'px',
'opacity':'0.7',
'display':'none'
}).appendTo( 'body' ).fadeIn(100).delay(Math.ceil(Math.random()*4000)).fadeOut(200, function(){
$(this).remove();
haunt();
});
}, Math.ceil(Math.random()*900000));
})();