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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:00:18+00:00 2026-05-27T14:00:18+00:00

hi here is my live page http://mehrdadkhoshbakht.com/test/index.html there is a jquery sliding animation on

  • 0

hi here is my live page

http://mehrdadkhoshbakht.com/test/index.html

there is a jquery sliding animation on the header my problem is with those little gray slideup dives on the bottom of the sliding pictures
they suppose to slide up on mouseover and then reset to their original position afterward and they do on slow moves

animate :

sub_div.animate({top:"-=20"},500);})

and reset :

    $('.sub').hide();
    $('.sub').css('top','190px' );

but if I move mouse very fast on and off of the pics that title dives keeps on coming up.
but I do reset their position at the beginning of the code so this doesn’t happen but still no luck

I did try

sub_div.stop(true).animate({top:"-=20"},500);})

it didn’t work

here is my html
Divs with the pics class are those sliding divs and the sub class divs are the little title divs at the bottom.

<div id="wrapper">
    <div class="pics" id="pic1"><div class="sub">cccc</div></div>
    <div class="pics" id="pic2"><div class="sub">mmm</div></div>
    <div class="pics" id="pic3"><div class="sub">mmmm</div></div>
    <div class="pics" id="pic4"><div class="sub">mmm</div></div>
    <br  class="clearfloat"/>
</div>

my jq function

<script language="javascript">

$(function(){

        $('.pics').mouseover(function(){


      /* firs resetting all the sub divs at
         the bottom to default (in case of Previous event) */

        $('.sub').hide();
        $('.sub').css('top','190px' );

               /*  resizing all the divs to 86px exept mouse overed one !*/

            $('.pics').not(this).stop(true).animate({width:"86"},500 )

               /*  setting $this div to 400px */
            $(this).animate({width:"400"},500 , function(){

                   /* sliding up little title div at the bottom */
            var sub_div = $(this).find('.sub' );
            sub_div.show();
            sub_div.animate({top:"-=20"},500);})
         })


})
</script>

my other problem is this little title divs are appearing at the outside of their parent div i want them to appear when thy get insde of their parrend div area
i did set their parrent div over flow to hidden but i geusse that doesnt work with absolut posation

here is my css

/* slides parent div */
.container .header .top_pics {
    background-color: #F5D80A;
    position: relative;
    padding-bottom: 30px;
    padding-left: 20px;
    float: left;
    width: 680px;
}

/* sliding pictures (or divs) */
.container .header .top_pics .pics {
    width: 86px;
    float: left;
    height: 200px;
    overflow: hidden;

}
/* little slide up titles  */
.header .top_pics .sub  {
    background-color: #CCC;
    position: absolute;
    width: 395px;
    top: 200px;
    opacity : 5.0;
    display: none;
    padding-left: 5px;
    padding-top: 9px;
    padding-bottom: 9px;
}

/* each sliding pic*/
.header #pic1 {
    width: 400px;
    background-image: url(images/h1.jpg);
    background-repeat: no-repeat;
}
.header #pic2 {
    background-color: #0C9;
}

.header #pic3 {
    background-color: #C30;
}

.header #pic4 {
    background-color: #CCC;
}
  • 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-27T14:00:19+00:00Added an answer on May 27, 2026 at 2:00 pm

    The problem is the relative animation of the top property (-=20). Try changing that to the actual fixed pixel value to which you want to animate this property, e.g: if they start with top: 190px, try changing your animate function to sub_div.animate({top:'170px'},500);}).

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

Sidebar

Related Questions

Code is here: http://jsfiddle.net/nNdna/ live page is here: http://www.sumsy.com/demos/socialFeeds/ Please go to the live
For the live view of the problem page go here: http://rcnhca.org.uk/sites/first_steps/health-safety-and-security/ Problem 1: If
Here's my code in the <head></head> : <link rel=stylesheet href=http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css /> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js></script>
I am working off this test page: http://www.comehike.com/test_fb_connect.php When the user logs in using
I am playing around with this page: http://www.problemio.com/problems/problem.php?problem_id=228 To reproduce the problem, log in
You can see the issue live here: http://www.mtthwbsh.com/ I've read up on people having
http://pastebin.com/1MGTtzij here is my full html document, and below is the short version: $(document).ready(function
Here is the live page I am trying to implement on my Drupal website:
Here is a live example: http://jsfiddle.net/Pzvdv/ <ul id=navigation> <li><a href=#>HOME</a></li> <li><a href=#>OUR APPROACH</a></li> <li><a
Consider the following example: ( live demo here ) HTML: <div class=board> <div class=row>

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.