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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:00:19+00:00 2026-06-14T16:00:19+00:00

So I have this animation here http://kevingilbertportfolio.com/help/index.html and I am trying to get it

  • 0

So I have this animation here http://kevingilbertportfolio.com/help/index.html and I am trying to get it to move smoothly. It is supposed to whenever you mouse over it come out and when u bring the mouse cursor out it goes back in.. as you can see it is very very very messy.

HTML + CSS + jQuery

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title> - jsFiddle demo</title>  
  <script type='text/javascript' src='http://code.jquery.com/jquery-1.8.2.js'></script>
  <link rel="stylesheet" type="text/css" href="/css/normalize.css">
  <link rel="stylesheet" type="text/css" href="/css/result-light.css">
  <style type='text/css'>
    @charset "utf-8";
/* CSS Document */
* {
    margin:0;
    padding:0;
}

body {
    background-color:#636363;
}

.facebook-sw {
    margin-top:120px;
    float:right;
    margin-right:-300px;
    position: relative;
}

.fb-icon {
    float:left;
    margin-right:14px;
}

.fb-like-box {
    float:left;
}

.wrapper {overflow: hidden;}
  </style>
<script type='text/javascript'>//<![CDATA[ 
$(document).ready(function() {
    $('.facebook-sw').hover(function() {
        $('.facebook-sw').animate({
            left: '-=300'
        }, 900, function() {
            // Animation complete.

        });
    });
});
$(document).ready(function() {
    $('.facebook-sw').mouseout(function() {
        $('.facebook-sw').animate({
            left: '+=300'
        }, 900, function() {
            // Animation complete.

        });
    });
});
//]]>  
</script>
</head>
<body>    
    <div class="wrapper">
        <div class="facebook-sw">
            <img class="fb-icon" src="image/fb-icon.PNG" width="110" height="113" alt="">
            <img class="fb-like-box" src="image/example.JPG" height="544" width="292" alt="">
        </div>
    </div> 
</body>
</html>

HUGE 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-06-14T16:00:20+00:00Added an answer on June 14, 2026 at 4:00 pm

    Try this: (working fiddle can be found here http://jsfiddle.net/c9w3n/3/)

    $(document).ready(function() {
        $('.facebook-sw').hover(
            function() {
                $('.facebook-sw').stop(true, true).animate({
                    left: '-=300'
                }, 900, function() { });
            }, function() {
                $('.facebook-sw').stop(true, true).animate({
                    left: '+=300'
                }, 900, function() { });
            }
        );
    });
    

    The .hover() method in jQuery takes in two functions in which case the first one is for mouseover and the second one is for mouseout.

    Also, the issue you are having is related to animation queues, every time the mouse moves in or out, the entire animations keep getting added to the element, to prevent this, you can use .stop(). You can check the documentation for details, but the two parameters true, true that I have passed in basically say that cancel any other animations on that element and if any animation is currently running – move the element immediately to the end of the animation.

    Edit

    To prevent that flickering / snappy behavior you need to change the way you are animating the div. Instead of changing the left or right positioning, you need define an open and a close position for the div and use that.

    Working fiddle for the same here: http://jsfiddle.net/c9w3n/7/

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

Sidebar

Related Questions

I have found this article: http://www.zurb.com/article/221/css3-animation-will-rock-your-world on css3 animations. I am trying to create
Working example is here (this script deals with the triangle animation) http://movable.pagodabox.com/ full code
Using bootstrap, I have set an example up here: http://fixitup.com.au/clients/bootstrap/issue.html Using scrollto for the
So I have this really simple image slider this this page here http://charlesbergertattoos.com/tattoos which
I have this following jquery text fly-in animation.Here is my code before I explain
I have this complicated slider that utilizes tons of animation. I'm trying to find
I have a simple jquery flipcard animation - http://jsfiddle.net/gGAW5/36/ Now the way this flip
I've downloaded my accordion from here: http://www.snyderplace.com/demos/accordion.html and was told by my boss that
I have a jQuery animation example here : http://jsfiddle.net/p7Eta/ I would like all the
Hey all i have this code here on jsfiddle: http://jsfiddle.net/d7UjD/6/ I have 2 problems

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.