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

  • SEARCH
  • Home
  • 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 8910301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:39:21+00:00 2026-06-15T03:39:21+00:00

I am trying to create an effect where on button click, the div would

  • 0

I am trying to create an effect where on button click, the div would shake left and right and tilt about 10deg each way so it looks like a natural motion when shaking an object with two hands. I am able to create the left and right shaking effect but can’t seem to tie it in with rotation. I also need this to work in IE8, so css3 is not an option. I am using JQuery UI and .rotate() but if there is a better way please let me know. I need this to shake about 3-4 times on button click.

    <div class="container">
<div class="globe-main" id="globe">
    <div class="content"></div><!-- end .content -->
</div><!-- end .globe-main -->
    </div><!-- end .container -->

    <script>

var times = 4;
var loop = setInterval(rota, 300);

function rota() {
    times--;
    if(times === 0){clearInterval(loop);}
    $(".globe-main").rotate({animateTo:10, duration: 500, });
    //$(".globe-main").effect("shake", { times:3, distance:30 }, 800);

}
rota(); 

    </script>

Here is what I have so far FIDDLE

Thank you

UPDATE

Here is the updated FIDDLE

  • 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-06-15T03:39:22+00:00Added an answer on June 15, 2026 at 3:39 am

    jQuery has no method called rotate. This is probably where the problem lies.

    Edit

    Based on your comments, you could create your own queue I guess…

    rotationAnimationQueue = {
       queue: [],
       addAnimation: function( $jQueryObject, params ) {
          // add animation to the queue
          this.queue.push( {
             $jQueryObject: $jQueryObject,
             params: params
          } );
          // if only animation in queue, begin processing
          if ( this.queue.length === 1 ) this.processQueue();
       },
       processQueue: function() {
          var self = this;
          var animation = this.queue[ 0 ];
          animation.params.callback = function() {
             self.queue.shift();
             if ( self.queue.length > 0 ) self.processQueue();
          };
          animation.$jQueryObject.rotate( animation.params );
       }
    };
    

    See it in action here: http://jsfiddle.net/UnyYh/1/

    You may want to modify the queue code so that it keeps track of one queue per jQuery object. This way if needed you could have shake animations happening on multiple objects at the same time instead of always doing the animations in sequence.

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

Sidebar

Related Questions

I'm trying to create the effect of a button that 'lifts' from the page
I'm trying to create a SVG filter that would create an Anaglyph effect. What
I'm trying to create this effect: http://www.thecssninja.com/demo/css_tree/ the problem I'm having is that the
I am learning android and trying to create an effect of folding the view
i am trying to create a fade effect with the following...ive been told im
im trying to create a horizontal scrolling box to create a timeline effect... but
I am trying to create sliding images effect: Online demo link text . The
I am trying to create a slide transition effect like the one posted in
I am trying to create an effect similar to the Lights out /lights dim
I'm trying to create an effect where if the user hovers the mouse over

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.