Not sure why this isn't working:

  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 846
  • Status: Offline

Post July 6th, 2009, 11:32 pm

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.
Use your words like arrows to shoot toward your goal.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 6th, 2009, 11:32 pm

  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 846
  • Status: Offline

Post July 7th, 2009, 2:04 am

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.
Use your words like arrows to shoot toward your goal.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 136 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
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.