help me with jQuery code Please

Discussion in 'jQuery' started by crazy.works, Sep 4, 2009.

  1. #1
    hello,
    i am doing animated display list, so lets say inside the list will be 6 <li>, with the jQuery i will hide 2 and i will display only 4 elements.
    and after that i will animate the elements with scroll effect, so the <li> elements will be changed every couple of seconds, one element will disappear and then another one will be inserted and displayed .

    now i got problem with the part which inserting new element, and here is my code


    so with this code i insert new <li> element with the $insert variable as you see in my code.

    every thing in the code works fine, but my problem is i don't know how to determine the position of the new inserted <li> element, i mean it always get inserted in the top of the list, and i want to insert the new element in the bottom of the list

    so please how can i edit this to insert the new element in the bottom of the list ??
    thanks
     
    crazy.works, Sep 4, 2009 IP
  2. crazy.works

    crazy.works Peon

    Messages:
    304
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    maybe the problem is prependTo and that is why it insert the new element at the beginning of the list each time ???
    how can i reverse prependTo to insert the element at the end of the list ???
     
    crazy.works, Sep 4, 2009 IP
  3. crazy.works

    crazy.works Peon

    Messages:
    304
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks guys, i fixed it with my own :)
     
    crazy.works, Sep 5, 2009 IP