i wrote a crossfade jquery code based on this

<div class="slider-postnum">
<div class="child1 divactive"><img /><p>A</p></div>
<div class="child2"><img /><p>B</p></div>
<div class="child3"><img /><p>C</p></div>
<div class="child4"><img /><p>D</p></div>

then i wrote this for the button
<div class="button-postnum">
<a href="#child1" class="linkchild1"><img /></a>
<a href="#child1" class="linkchild2"><img /></a>
<a href="#child1" class="linkchild3"><img /></a>
<a href="#child1" class="linkchild4"><img /></a>

child div are all position absolute and z-index of 0
with divactive class z-index of 3 and tobeactive class z-index of 2

each linkchildx are registered to a click function that do the following,

1. get the childx div inside slider div which has the divactive,
2. insert a tobeactive class to the one the will fade in,
3. fade out the div with divactive class
4. remove the div with divactive class from it.
5. insert divactive to div that has tobeactive.
6. remove the tobeactive class

so i don't have time to debug the code, it failed after move in side another slider, may i know if there is a similiar code that does this? this will be inside another slider,
so there will be multiple crossfade in each slide.