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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:42:05+00:00 2026-06-02T14:42:05+00:00

Please see this fiddle and click decrease: http://jsfiddle.net/2C8fy/16/ As you can see the images

  • 0

Please see this fiddle and click “decrease”:

http://jsfiddle.net/2C8fy/16/

As you can see the images sort of bounce to the right. The increase function button works exactly as it should. I know the problem lies in this function and I have pin pointed it specifically with notes:

 function slide_img_right() {

    var imgs = imgArr.length;
    a--;
    if (a < 0) {
        a = imgs - 1;
    }

    b = a - 1;
    c = a + 1;

    if (b < 0) {
        b = imgs - 1;
    }
    if (c >= imgs) {
        c = 0;
    }

    var left = $('#left_slot');
    var middle = $('#middle_slot');
    var right = $('#right_slot');
    var newImgSR = imgArr[a].clone();

    $('#basic_div').animate({
        left: '+=40px'      // This part is causing the bounce
    }, 300, function() {

    });


    left.attr('id', 'middle_slot');
    middle.attr('id', 'right_slot');


    (newImgSR).insertBefore("#middle_slot");
    newImgSR.attr('id', 'left_slot');
    newImgSR.css('opacity','0');
    newImgSR.fadeTo(300, 1);


    right.animate({
        opacity: 0
    }, 300, function() {
        right.remove();
        $('#basic_div').css({
            left: '0px'               //This part is causing the bounce back.
        });
    });
}

I just don’t know how to fix it. I have tried changing the width instead of the left, and I have also tried changing the order in which things occur in the function, but what can I do to get that thing to work like the increase button only in the opposite direction? Thanks!

  • 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-02T14:42:06+00:00Added an answer on June 2, 2026 at 2:42 pm
    $('#basic_div').css("left","-40px"); //Add this line here.
    
            $('#basic_div').animate({
                left: '+=40px'      // This part is causing the bounce
            }, 300, function() {
    
            });
    

    see updated fiddle: http://jsfiddle.net/2C8fy/19/

    To see why take a look at:

    http://jsfiddle.net/2C8fy/20/ Here, you can see that in order to slide that image into view, it has to be outside of your current viewing area.

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

Sidebar

Related Questions

Please take a look at this fiddle: http://jsfiddle.net/hughbe/QYGcq/ As you can see, the label
Please see this: My code looks like this now: http://jsfiddle.net/Bd9Ut/ As you can see
Please see this fiddle: http://jsfiddle.net/ZWw3Z/5/ My code is: p { position: relative; background-color: blue;
http://jsfiddle.net/4UbKe/3/ Please check out the fiddle to see exactly why it doesn't work. I'm
Please take a look at the fiddle: http://jsfiddle.net/Fyc5d/ Click a gray box, and you'll
Possible Duplicate: .prop() vs .attr() Please take a look at this fiddle: http://jsfiddle.net/DGzvP/ $(#test).prop({
please take a look at this fiddle : http://jsfiddle.net/cX47v/1 I am simply trying to
Please have a look at this fiddle: http://jsfiddle.net/mrmartineau/53fkV/embedded/result/ The intended outcome is that when
Please see this jsFiddle: https://jsfiddle.net/Wmq6f/ I have a textarea that has a background image,
I have this fiddle which has an error --> http://jsfiddle.net/Osoascam/AkZZr/6/ (This is the version

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.