forked from 0x2620/oxjs
change onload fade
This commit is contained in:
parent
0c5e61c678
commit
87cba1090c
2 changed files with 26 additions and 7 deletions
|
|
@ -1,7 +1,18 @@
|
|||
$(function() {
|
||||
|
||||
var $body = $('body'),
|
||||
$head = $('head'),
|
||||
$div = $('<div>')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
background: 'rgb(240, 240, 240)',
|
||||
opacity: 1,
|
||||
zIndex: 1000
|
||||
})
|
||||
.appendTo($body),
|
||||
css = {
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
|
|
@ -50,7 +61,7 @@ $(function() {
|
|||
width: '32px',
|
||||
height: '32px'
|
||||
}))
|
||||
.appendTo($body),
|
||||
.appendTo($div),
|
||||
deg = 0,
|
||||
interval = setInterval(function() {
|
||||
deg = (deg + 30) % 360;
|
||||
|
|
@ -85,7 +96,7 @@ $(function() {
|
|||
}
|
||||
});
|
||||
function loaded() {
|
||||
var $div = $('<div>')
|
||||
var $div_ = $('<div>')
|
||||
.css($.extend(css, {
|
||||
width: (length * 72) + 'px',
|
||||
height: '72px'
|
||||
|
|
@ -127,9 +138,9 @@ $(function() {
|
|||
}, 250);
|
||||
})
|
||||
)
|
||||
.appendTo($div);
|
||||
.appendTo($div_);
|
||||
});
|
||||
$div.appendTo($body);
|
||||
$div_.appendTo($div);
|
||||
//throw new Error('User Agent not supported.');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue