views:

14

answers:

0

Hi, I have a gallery setup to find the next span, this works, but the gallery navigation(next/previous/imageclick) is not passing the callback.

$("a[ rel='gallery']").colorbox({
    onLoad:function(){
        $(this).next('span').show().prependTo($('#cboxContent'));   
        $('span').addClass("current");
        }
});

I tried something like this:

$('#cboxNext, #cboxPrevious, #cboxPhoto, #cboxClose').click(function (e) {
    $('span').removeClass('current');       
    return false;
});

Seems to be working also, but how would I pass it so it will remove the showing span and show only the next span?

$('span').remove(); with class current?

HTML

<ul>
    <li><a href="images/1.jpg" rel="gallery" title="test tes te"><img src="images/1tn.jpg" alt="" width="322" height="258" /></a>
    <span>test test test test<a href="http://google.com/"&gt;gigiieageh </a></span></li>
    <li><a href="images/2.jpg" rel="gallery"><img src="images/2tn.jpg" alt="" /></a>
    <span>b354255667 7 6776   hfrtgjhnkmtg etaw  <a href="http://google.com/"&gt;gigiieageh </a></span></li>
    <li><a href="images/3.jpg" rel="gallery"><img src="images/3tn.jpg" class="right_img" alt="" /></a>
    <span>767kjk  atewt jaowih rjrsenorse <a href="http://google.com/"&gt;gigiieageh </a></span></li>
</ul>

http://colorpowered.com/colorbox/