jquery queue issues

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

Post March 27th, 2010, 6:27 pm

So I want one set of animations to continue working as normal in the queue. However, I want to have a separate queue that clears anytime a new functionis executed.

Here's a bit of code :

JAVASCRIPT Code: [ Select ]
$('#squares-wrapper div div').hover(
function() {
   $(this)
      .css({
         backgroundColor : 'rgba(255, 255, 255, 0.4)'
      });
   $(this).animate({
      opacity : '0.4'
      }, 100);
},
function() {
   $(this).animate({
      opacity : '0.05'
      }, 300);
});
 
  1. $('#squares-wrapper div div').hover(
  2. function() {
  3.    $(this)
  4.       .css({
  5.          backgroundColor : 'rgba(255, 255, 255, 0.4)'
  6.       });
  7.    $(this).animate({
  8.       opacity : '0.4'
  9.       }, 100);
  10. },
  11. function() {
  12.    $(this).animate({
  13.       opacity : '0.05'
  14.       }, 300);
  15. });
  16.  

and this bit:
JAVASCRIPT Code: [ Select ]
$('#squares-wrapper div div#00').mouseover(function() {
   $('#instruct div').animate({
      top : ((insh * 0)/100) * (-1) + 'px',
      left : ((insw * 0)/100) * (-1) + 'px'
   }, 500);
});
 
$('#squares-wrapper div div#01').mouseover(function() {
   $('#instruct div').animate({
      top : ((insh * 10)/100) * (-1) + 'px',
      left : ((insw * 0)/100) * (-1) + 'px'
   }, 500);
});
 
  1. $('#squares-wrapper div div#00').mouseover(function() {
  2.    $('#instruct div').animate({
  3.       top : ((insh * 0)/100) * (-1) + 'px',
  4.       left : ((insw * 0)/100) * (-1) + 'px'
  5.    }, 500);
  6. });
  7.  
  8. $('#squares-wrapper div div#01').mouseover(function() {
  9.    $('#instruct div').animate({
  10.       top : ((insh * 10)/100) * (-1) + 'px',
  11.       left : ((insw * 0)/100) * (-1) + 'px'
  12.    }, 500);
  13. });
  14.  


So if I want the mouseover effects to clear each other, but want the hover effect to continue uncleared. I'm sure there's a way to do this by created separate queues aside from the default "fx" queue that is created by the jquery core. I'm just not sure how to create those queues and assign specific functions to them or how to clear only one queue and not the other.
Use your words like arrows to shoot toward your goal.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 27th, 2010, 6:27 pm

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: ScottG and 198 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.