function determineNextChild( container ) { if ( container.hasNextChild() ) return container.nextChild() switch ( EndImageBehaviour ) { case 'nothing' : return null case 'loop' : return container.firstChild() case 'proceed' : return container.nextContainer().firstChild() default : error("Invalid EndImageBehaviour setting") } }
ContainerParent : document.getElementById('MyContainers')
Containers : ['#album1','#album3','.otheralbums:not(#al7)']
<ul id="container1"> <li><span>(1 of 3)</span> <a href="kitten.jpg">Kitten</a></li> <li><span>(2 of 3)</span> <a href="puppy.jpg">Puppy</a></li> <li><span>(3 of 3)</span> <a href="squirrel.jpg">Squirrel</a></li> </ul>
I'm guessing you haven't looked much more into this?
A friend I'm making a site for wants Next and Prev buttons and I really don't want to use Lightbox :(