Not sure why this isn't working:

  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

I have this here script:

Code: [ Select ]
 
// 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);
        });
 
  1.  
  2. // JavaScript Document
  3. $(document).ready(function(){
  4.  
  5. $.fn.wait = function(time, type) {
  6.         time = time || 1000;
  7.         type = type || "fx";
  8.         return this.queue(type, function() {
  9.             var self = this;
  10.             setTimeout(function() {
  11.                 $(self).dequeue();
  12.             }, time);
  13.         });
  14.     };
  15.  
  16. $('#home').click(function(){
  17.         $('.content').slideUp(500);
  18.         $('#homewrap').slideUp(500);
  19.         $('#contentwrap').stop().wait().animate(
  20.             {backgroundPosition:'(0px 0px)'},
  21.             {duration:500});
  22.         $('#facewrap').stop().wait().animate(
  23.             {backgroundPosition:'(0px 0px)'},
  24.             {duration:500})
  25.         $('#homewrap').wait().fadeIn(500);
  26.         });
  27.  


the .wait() effect is workin just fine 66% of the time. The last line of each function:
Code: [ Select ]
 
$('#homewrap').wait().fadeIn(500);
 
  1.  
  2. $('#homewrap').wait().fadeIn(500);
  3.  

isn't working, the fadeIn effect is initiating during the

$('#facewrap').stop().wait().animate(
{backgroundPosition:'(0px 0px)'},
{duration:500})"

animation.
Each item except for that line is waiting it's turn as it should.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

okay, I figured it out. For anyone that wants to know, it's because the background animate plugin doesn't work well with other plugins.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 71 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.