ExDirty
ExDirty

Reputation: 79

jquery function one per load/refresh

 $(".avatar-box1").mouseleave(function(){
        $( ".avatar-box1" ).effect( "bounce", "slow" );

    });

hello i need to run this effect only once per load/refresh the page. Grateful for any advice

Upvotes: 0

Views: 27

Answers (1)

Dave
Dave

Reputation: 10924

You should use jQuery .one()

 $(".avatar-box1").one("mouseleave", function(){
    $( ".avatar-box1" ).effect( "bounce", "slow" );
 });

Upvotes: 1

Related Questions