Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7573831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:16:54+00:00 2026-05-30T16:16:54+00:00

doing some jQuery animation for a high profile client that has to be finished

  • 0

doing some jQuery animation for a high profile client that has to be finished by lunch

Basically what I’m trying to do is animate an object in a 360 degree circle repeatedly when it is hovered, and return the animation to its start point when the mouse leaves.

I’m using the Jquery rotate plugin http://code.google.com/p/jqueryrotate/wiki/Examples

I’ve got it to animate on mouseover, however can’t, no matter how hard I try, get it to stop animating on mouse out – I’m currently messing around with intervals to try and get it to cooperate – here’s my current code, what am I missing?!?!

    function rotation(){

    jQuery("#merm").rotate({angle:0, animateTo: 360, callback: rotation });
    }

    jQuery("#sirens").hover(
        function(){
        hoverInterval = setInterval(rotation, 1000);
        },
        function(){
            clearInterval(hoverInterval);
        }
    );

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:16:55+00:00Added an answer on May 30, 2026 at 4:16 pm
    $(function(){
        var t;
        $("#sirens").mouseenter(function(){
            var angle = 0;
            t = setInterval(function(){
                angle+=3;
                $("#sirens").rotate(angle);
            },50);
        }).mouseleave(function(){
            clearInterval(t);
            $("#sirens").rotate(0);
        });
    });
    

    See it working here: http://jsfiddle.net/t4MHp/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Doing some jquery animation. I have certain divs set up with an attribute of
I have some jquery code that is doing an ajax lookup and returning comma
I am doing an AJAX call that returns some HTML and jQuery: <div id='selected'>Here
I've got some code that's basically identical to the jQuery UI Sortable example here:
If for example, I have some jQuery doing something simple like: $(div).fadeIn('fast'); $(div).html('Foo'); That
When I am doing animation with jQuery (like $(.myClass).slideDown() ) it adds some styles
I'm trying to get the mouse coordinates during a jQuery animation, I'm doing this
I'm trying to achieve some animation using jQuery. I have it working but I'm
I have an html table that I am trying to add some animation to
I'm doing some shennanigans with jQuery to put little plus/minus icons next to my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.