The problem: coda-slider does not provide for assigning a class to the inside of the current panel. It lets you assign the current class to the dynamic tabs, if they are enabled, but some projects require applying the current class to the elements that are being displayed and rotated.
The solution: add a function to the source code of the plugin:
return this.each(function(){
// Uncomment the line below to test your preloader
// alert(“Testing preloader”);
var slider = $(this);
// to add current class to current panel
slider.setCurrentPanel = function() {
$(‘.panel’, slider).removeClass(‘current’);
$(‘.panel:eq(‘ + (currentPanel-1) + ‘)’, slider).addClass(‘current’);
}
Next, add the function call to the places where currentPanel is set: lines 83, 99, 119 and 226)
slider.setCurrentPanel();
You can change the file yourself or just download the result.
