user1784025 user1784025 - 1 year ago 92
jQuery Question

Scrolling through multiple DIV elements

For example let's say that I have a div element with

width and
height. Inside that div I have 6 div elements floated left, with
enabled. What I want to achieve is, that user can scroll through loop of these divs (so that last div element is followed by first - infinite loop).

Any idea how to approach?

enter image description here

Answer Source

You can use jQuery insertAfter and insertBefore functions

     var last = $('#parent').find('div').last();

     var first= $('#parent').find('div').first();

Here is the DEMO

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download