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

The Archive Base Latest Questions

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

So, I am attempting to build an infinite jQuery carousel and it’s working pretty

  • 0

So, I am attempting to build an infinite jQuery carousel and it’s working pretty well in one direction but not in another. Well it is working in another, but only sort of.

To make infinite manipulation happen, this is what I do:

if(navId == 'forward')
{
  $('#slides ul').animate({'left':left_indent},1200, function(){
  $('#slides li:last').after($('#slides li:first'));
  $('#slides ul').css({'left':0});
 } );
}

if(navId == 'backward')
{
   $('#slides ul').animate({'left':right_indent},1200, function(){
  $('#slides li:first').before($('#slides li:last'));
  $('#slides ul').css({'left':0});
 } );

As you can see, it is just some subtle dom manipulation and it works perfectly for ‘forward’ but for ‘backward’, it is glitchy. You can check it out here @ JSFIDDLE

I have done some tricks to counter this, but none of them are working.
Anybody know what’s up?

  • 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:44:27+00:00Added an answer on June 15, 2026 at 3:44 am

    In addition to my comment, your fiddle which can do two way

    function slideshow()
    {
      var item_width = $('#slides li').outerWidth(true);
      var old_left = parseInt($('#slides ul').css('left'));
      var left_indent = old_left - item_width;
      var right_indent = old_left + item_width;
      var navId = $(this).attr('id');    
    
      if(navId == 'forward')
      {
        $('#slides ul').animate({'left':left_indent},1200, function(){
          $('#slides li:last').after($('#slides li:first'));
          $('#slides ul').css({'left':0});
        });
      }
    
      if(navId == 'backward')
      {
        $('#slides li:first').before($('#slides li:last')); // <<< different
        $('#slides ul').css({'left':-485});                 // <<< different
        $('#slides ul').animate({'left':0},1200, function(){// <<< different
        });
      }
    }​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to build ruby 1.8.7 on OS X. This is only for one
I am attempting to build a Java web project on NetBeans 6.8, but I
I'm attempting to build a gem for interacting w/ the Yahoo Placemaker API but
Attempting to build a Visual Studio 2010 solution with 132 projects which do not
I am attempting to build std::vectors and std::maps of std::shared_ptrs , but they seem
I'm attempting to build an extremely simple, but cross-browser compatible, asynchronous file uploader, as
I am attempting to build out a visual jQuery based browser for thumbnailed assets
I'm attempting to build my first ruby gem and all seemed to go well
I am attempting to build a UI such that a JQuery Accordion is contained
I am attempting to build a gallery page for a website I am working

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.