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

  • Home
  • SEARCH
  • 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 1028911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:27:45+00:00 2026-05-16T12:27:45+00:00

I have a list. When the user performs some action, I want to replace

  • 0

I have a list. When the user performs some action, I want to replace all the list content, but present it as if the new list data is sliding in from right to left, with the old list data being pushed off to the left. Example:

<ul id='content'>
  <li>red</li>
  <li>green</li>
</ul>

now when the user pushes a button for example, I’ll have new list content:

<ul id='content'>
  <!-- 
     replace list item content now.
     the old red,green items should slide off to the left.
     the new yellow,purple items should slide in from the right
  -->
  <li>yellow</li>
  <li>purple</li>
</ul>

I’m not sure how I could slide all the old li elements out from left to right, the jquery-ui hide+slide effect seems to be what I want though:

http://jqueryui.com/demos/hide/

if I can combine that with the show+slide effect, I think I can get it working. I’m wondering though if this is a good solution to pursue, or if there’s a simpler way to go? I’m mostly concerned that the slide-in and slide-out animations will have to sync up otherwise it’ll look bad,

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-05-16T12:27:46+00:00Added an answer on May 16, 2026 at 12:27 pm

    The slight issue you will run into here is the slide animation doesn’t queue (not sure who made that brilliant decision), so you’ll need to queue yourself, like this:

    $("#content").hide('slide').delay(400).queue(function() { 
      //replace then show new items
      $(this).html("<li>yellow</li><li>purple</li>").show('slide').dequeue();
    });
    

    You can give it a try here. This uses .delay() and .queue() to manually queue the replacement/hide to happen 400ms after the hide begins (400ms is the default duration, change if you give .hide() a different duration). Make sure to call .dequeue() on the end or use .queue(function(n) { ...my stuff... n(); }) so that the animation queue isn’t stuck waiting next time.

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

Sidebar

Related Questions

I have a radio button list and I want to perform some action when
i have list of rows that user select and i want to delete them,
I have a table that contains some user data: user_id | guest_id | time_seen
I have a list of User Controls in a screen in my WP7 app.
I have a list of user identifiers which are pretty long. The identifiers may
Greetings, I have a list of user comments on a page, with a next
I have a list of the user's images displayed, (who has already allowed access
I have a list of videos that a user can select from to watch.
I have a list of questions that the user will iterate through, they can
I have a list of company names and the user has to enter his

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.