Closed claudchan closed 12 years ago
Could you please share some code, demo or even a live site of this issue.
Hi Mottie, Here is the demo: http://jsfiddle.net/claudchan/hW34t/
Ahh ok, the problem is that the cbox isn't being initialized on the cloned slide. Move the call to cbox()
to inside of the onInitialized
callback function and it will start working (demo):
var cbox = function(){
$('.cbox-content').colorbox({
iframe: true,
opacity: 0.75,
innerWidth: 400,
innerHeight: 350
});
},
$otherslider = $('#other-slider-items');
$otherslider.anythingSlider({
hashTags: false,
resizeContents: false,
buildStartStop: false,
buildNavigation: false,
autoPlay: true,
autoPlayLocked: true,
delay: 5000,
resumeDelay: 5000,
showMultiple: 2,
changeBy: 1,
infiniteSlides: true,
stopAtEnd: false,
onInitialized: function(e,slider){
cbox();
}
});
Wow, works like charm! Thanks!
Hi, Not sure if anyone encounter this. I am using [ showMultiple: 2, changeBy: 1, infiniteSlides: true, stopAtEnd: false ] in anythingslider. My slider is showing 2 items in a slide. In my first item, I have a button will trigger colorbox which is runs fine at first slide (activePage). When the slider changing, my first item which fall on second panel, there is a issue trigger my colorbox. I saw an error: Error: cboxElement missing settings object
Then when slider changing again, if my first item fall back to the first panel (activePage), it working properly.
I wonder why anythingSlider has this issue with colobox only if it not at the first panel (activePage).