Jump to content
Search Community

Rmin

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Rmin

  1. hey guyz, i wanna use it On mouseover , and finish it On mouseout event, and im not quiet goOd with javascript things

     

    $("#box").mouseout(function(){
    TweenMax.staggerTo(".boxes",0.2,{scale:1},0.05);
    
    
    wiggle(".boxes");
    
    
    function wiggle(selector){
     $(selector).each(function() {
    wiggleProp(this, 'scale', 0.93, 1);
    wiggleProp(this, 'rotation', -5, 5);
    wiggleProp(this, 'x', -3, 3);
    wiggleProp(this, 'y', -3, 3);
     })
    }
    
    
    function wiggleProp(element, prop, min, max) {
     var duration = Math.random() * (.1 - .2) + .1;
    
    
     var tweenProps = {
    ease: Power1.easeInOut,
    onComplete: wiggleProp,
    onCompleteParams: [element, prop, min, max]
     };
     tweenProps[prop] = Math.random() * (max - min) + min;
    
    
     TweenMax.to(element, duration, tweenProps);
    }
    });

    but i cant stop them On mouseout.

    Thanks.

     

×
×
  • Create New...