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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:13:16+00:00 2026-05-28T00:13:16+00:00

New list items are generated by JS. Each new list item comes in with

  • 0

New list items are generated by JS.
Each new list item comes in with a nice animation. Now I don’t want to see an animation on the first list item.

So far I tried to add slice(1) to the code, but no luck:

$('li.show').slice(1).animate({left: '-=100'}, 300);

How can I make this work using the lastest version of JQuery?

  • 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-28T00:13:16+00:00Added an answer on May 28, 2026 at 12:13 am

    If you are using an AJAX request to build your list then you will need to call the code you posted inside a callback function for the AJAX request so the added HTML will be present in the DOM before you try to manipulate it:

    $.get('<URL>', function (serverResponse) {
    
        //append the new list-items to the list, select them, un-select the first index, then animate the remaining elements
        $('ul').append(serverResponse).children('.show').slice(1).animate({left: '-=100'}, 300);
    });
    

    Note that this code snippet expects your server-side script to output valid HTML that can be added right into the DOM.

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

Sidebar

Related Questions

I want to restrict entry of new item into sharepoint calendar list with the
I'm building a large string from a list of items. Each item will generate
I have a PHP generated form which consists of a list of items, each
I have List with n items. I wish transform my list to new list,
How can I compare the items in two lists and create a new list
List<SelectListItem> items = new List<SelectListItem>(); if (a) { SelectListItem deliveryItem = new SelectListItem() {
I'm using the new ASP.Net ListView control to list database items that will be
When I add a new item in a default Announcement list using the GUI
The following javascript should setup an interval so a new item from the list
I have a listview that needs to be multiple choice (i.e each list item

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.