change onload fade

This commit is contained in:
rolux 2010-09-06 02:56:18 +02:00
parent d96094f0df
commit d3aa635aac
2 changed files with 26 additions and 7 deletions

View File

@ -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.');
}
}

View File

@ -216,10 +216,15 @@ requires
$.getJSON(self.options.config, function(data) {
var config = data;
that.request(self.options.init, getUserData(), function(data) {
Ox.print('!!!', data)
var user = data.data.user;
$(function() {
$('body').empty();
var $div = $body.find('div');
$body.find('img').remove();
$div.animate({
opacity: 0
}, 1000, function() {
$div.remove();
});
callback({
config: config,
user: user
@ -636,6 +641,9 @@ requires
Ox.Request = function() {
// fixme: do we want, instead of request('find', data, callback),
// something like server.find(data, callback)?
var cache = {},
pending = {},
requests = {},