He aquí este script & #058;
// JavaScript Document
$(document).ready(function(){
$.fn.wait = function(time, type) {
time = time || 1000;
type = type || "fx";
return this.queue(type, function() {
var self = this;
setTimeout(function() {
$(self).dequeue();
}, time);
});
};
$('#home').click(function(){
$('.content').slideUp(500);
$('#homewrap').slideUp(500);
$('#contentwrap').stop().wait().animate(
{backgroundPosition:'(0px 0px)'},
{duration:500});
$('#facewrap').stop().wait().animate(
{backgroundPosition:'(0px 0px)'},
{duration:500})
$('#homewrap').wait().fadeIn(500);
});
-
- // JavaScript Document
- $(document).ready(function(){
-
- $.fn.wait = function(time, type) {
- time = time || 1000;
- type = type || "fx";
- return this.queue(type, function() {
- var self = this;
- setTimeout(function() {
- $(self).dequeue();
- }, time);
- });
- };
-
- $('#home').click(function(){
- $('.content').slideUp(500);
- $('#homewrap').slideUp(500);
- $('#contentwrap').stop().wait().animate(
- {backgroundPosition:'(0px 0px)'},
- {duration:500});
- $('#facewrap').stop().wait().animate(
- {backgroundPosition:'(0px 0px)'},
- {duration:500})
- $('#homewrap').wait().fadeIn(500);
- });
-
el. wait () efecto es Workin bien el 66% del tiempo. La última línea de cada función:
$('#homewrap').wait().fadeIn(500);
-
- $('#homewrap').wait().fadeIn(500);
-
no está funcionando, el efecto fadeIn está iniciando en el
$ ( #facewrap). stop (). wait (). animar (
(backgroundPosition: (0px 0px)),
(duration: 500)) "
animación.
Cada tema, excepto para esa línea está esperando a su vez, como debe ser.
Use your words like arrows to shoot toward your goal.