Search code examples
jquerycloneappendhtml-listseasyslider

JQuery: Clone when moved offscreen


I have a slider and the slider stretches 100% of the page. I wish to programmatically clone the first element as it leaves the screen and place it at the end, or rather, just move it, without a clone to keep the memory low. Could somebody point me in the right direction to do this?

I'm currently using EasySlider 1.7

Cheers


Solution

  • are you looking for

    var hold = $(element);
    var parent = hold.parent();
    hold.detach();
    parent.append(hold);
    

    or

    var hold=$(element);
    hold.position(hold.parent().children().length);
    

    not sure about the last one though probably need some more test :p