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 8018239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:05:15+00:00 2026-06-04T21:05:15+00:00

I am using the easing plugin to ‘shake’ my anchor tag when a user

  • 0

I am using the easing plugin to ‘shake’ my anchor tag when a user hovers with the mouse. It works if I attach it to any element other than the <a> tag. I also tried attaching the behavior to the preceding <li> but it didn’t work there either. I’m a right noob with JQuery; I figured it must be something specifically to do with anchor tags, but I couldn’t find anything with a quick Google search. Perhaps I’m overlooking something? Here is my code below:

          <section id="content">
              <nav>
                    <ul>
                        <li id="selected">Home</li>
                        <li style="margin-left:35px;"><a href="about_alabama_bunker.html" title="Learn about Alabama Bunker" class="shake">About</a></li>
                        <li style="margin-left:5px;"><a href="services_offered.html" title="Services offered by Alabama Bunker" class="shake">Services</a></li>
                        <li style="margin-left:5px;"><a href="security_bunker_products.html" title="Product catalog" class="shake">Products</a></li>
                        <li style="margin-left:25px;"><a href="contact_alabama_bunker.html" title="Get in touch with our sales staff for inquiries, comments or suggestions" class="shake">Contact</a></li>
                    </ul>
              </nav>

          </section>

and my JQuery:

<script type="text/javascript">
$(document).ready(function() {
$('a.shake').hover(function(event) {
    $(this)
        .css(
            {'color': 'ff0000' }, {
                duration: 'slow',
                easing: 'easeOutBounce'
            })
        .animate(
            { left: 25 }, {
                duration: 'fast',
                easing: 'easeOutBounce'
            })
        .animate(
            { left: 0 }, {
                duration: 'fast',
                easing: 'easeOutBounce'
            });
    });
});
</script>

UPDATE

I removed the first animation for the color change. I have tried moving the class into the <nav> and the <ul> element respectively. I have also made sure the call to the selector is to $(.shake) instead of $(a.shake). No workee in any circumstance.

  • 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-04T21:05:16+00:00Added an answer on June 4, 2026 at 9:05 pm

    In your css, have you attribute position: relative or position: absolute ?

    nav ul li a.shake {
        text-decoration: none;
        display: block;
        position: relative;
        }
    
    
    <script type="text/javascript">
        $(document).ready(function() {
        $('a.shake').hover(function(event) {
            $(this)
                .animate(
                    { left: 200 }, {
                        duration: 'slow',
                        easing: 'easeOutBounce'
                    })
                .animate(
                    { left: 0 }, {
                        duration: 'slow',
                        easing: 'easeOutBounce'
                    });
        });
    });
      </script>    
    

    Without adding position attribute it won’t work also with event.preventDefault().

    Also i hope that you have in your <head> tag

    <script src="yourPath/jquery.easing.1.3.js" type="text/javascript"></script>
    

    It’s necessary for work.


    So edit your code like this:

    <section id="content">
                  <nav>
                        <ul>
                            <li><a style="position: relative; margin-left:35px;" href="about_alabama_bunker.html" title="Learn about Alabama Bunker" class="shake">About</a></li>
                            <li><a style="position: relative; margin-left:5px;" href="services_offered.html" title="Services offered by Alabama Bunker" class="shake">Services</a></li>
                            <li><a style="position: relative; margin-left:5px;" href="security_bunker_products.html" title="Product catalog" class="shake">Products</a></li>
                            <li><a style="position: relative; margin-left:25px;" href="contact_alabama_bunker.html" title="Get in touch with our sales staff for inquiries, comments or suggestions" class="shake">Contact</a></li>
                        </ul>
                  </nav>
              </section>
    

    I tested it and it works!

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

Sidebar

Related Questions

I'm using a jQuery plugin for custom Easing (jQuery Easing v1.3 -http://gsgd.co.uk/sandbox/jquery/easing/) to add
I'm using jQuery with Easing plugin and i would like to achieve constant easing
Using jQuery the jquery plugin along with the easing plugin. I have a series
I'm using the jQuery easing plugin on a site, but I've run into a
Can someone tell me how to add easing to this plugin. I understand there's
I'm currently using the anythingSlider it works quite well. But if there is one
Using the code sample below, how could I utilize the jquery cookie plugin so
I'm using localScroll and easing to smoothly scroll my site: http://www.pressedweb.com/beta Everything is cool,
Trying to use JQuery Easing plugin in my wordpress but its giving me following
I'm using the Cycle plugin for a slideshow. The images are supposed to crossfade

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.