Hey there.

I got a problem with the jquery cycle plugin.
I wanna use this plugin for Ajax content what I want is, 1 cycle box,
1 cycle pager, and I can change the content.
I've almost done, however, I got a problem.
I call Ajax content(first content), it succeeds
But when I change the content(load another content instead of first
content), I can see the problem in pager part.
It seems previous cycle is still alive...even I remove Ajax content.
My guess is that my functions can't kill the cycle process completely.


here are the parts of my functions,

// when Ajax finishes loading, it calls cycle plugin.
$.ajax({
        url: settings.ajax.url,
        success: function(xml){
        },
        complete: function(){attachCycleImages();}
});

// this calls cycle plugin, in here is there any problem?? :(
var attachCycleImages = function(){
        $('#imgBox').after('<ul id="imgCycle">').cycle({
                fx:'fade',
                timeout:4000,
                speed:1500,
                pager:  '#imgCycle',
                pagerAnchorBuilder: function(idx, slide) {
                        return '<li id="img'+idx+'"><a 
href="#">img'+idx+'</a></li>';
                },
                end:"clearTimeout(timeout)"
        })
}

// this is pager, remove current box and load new content.
// #floatbox includes #imgCycle
var pagerEvent = function(target){
        $(target).click(function(){
                var getURL = $(target).attr("href");
                $('#floatBox').fadeOut(200, function(){
                        $('#floatBox').remove();
                        pagerFlag = true;
                        $.floatbox({ajax:{url:getURL}});
                });
                return false;
        });
}


does anybody have solution??
if so, how can I get it to work?


thanks for reading,
yth

Reply via email to