views:

14

answers:

1

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

+1  A: 

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

dvhh
yeah but what function tests for if the image is off the page
Daniel Hanly
then you are probably looking for $(element).offset() and $(window).scrollTop()
dvhh
or $(window).scrollLeft() in the other case :p
dvhh