jquery queue issues

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

Post 3+ Months Ago

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.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 65 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.