replacing some div elements by some others, for a slider

replacing some div elements by some others, for a slider

hi !


i'm a newbie, and i'm trying to figure how to remove some divs by some others, on the click of a button or link.


these divs are used by a slider of pictures. and since i'd like to use a vertical list of links which each is a different gallery that should show in the slider of the page, i'm trying to use these links to change the set of pictures used in the slider.


exactly like here : http://www.jma.it/jm-architecture-jesolo-lido-pool-villa.html


( you can see in the list : jesolo, lake Lugano, etc etc ) .


i could make the slider to disapear, with a .remove()   event , but i'm not sure how to do, maybe with .append()  chained too or something ?


i'm using "royalslider" or "layserslider" , which works fine. basicaly it's working a bit like this :


<div class="slider" >


    <a class="rsImg" href="images/cam2.jpg">image desc</a>
    <a class="rsImg" href="images/cam3.jpg">image desc</a>
    <a class="rsImg" href="images/cam4.jpg">image desc</a


...  so i Wonder if there's a jquery way that would  replaces the "<a> img 2,3,4"  by an "<a>  img 4,5,6" ...

on the click of a button. but at the opening of the page, only the <a>img 2,3,4  should be active , since only the first link is active. then .. if you want, you can click in the list to show the other sets, still in the same slider .


thanks for your attention !