Open BHEADRICK opened 10 years ago
you need edit jquery.nivo.slider.js to solved this problem function processCaption
var processCaption = function(settings){
var nivoCaption = $('.nivo-caption', slider);
if(vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined){
var title = vars.currentImage.attr('title');
if(title.substr(0,1) == '#') title = $(title).html();
if(nivoCaption.css('display') == 'block'){
setTimeout(function(){
nivoCaption.html(title);
}, settings.animSpeed);
if(!title){
nivoCaption.stop().fadeOut(settings.animSpeed);
}
} else {
nivoCaption.html(title);
if(nivoCaption.contents().length){
nivoCaption.stop().fadeIn(settings.animSpeed);
}
}
} else {
nivoCaption.stop().fadeOut(settings.animSpeed);
}
}
@selul we should patch this I think I see it in our themes. User above seem to have posted the solution but that file doesn't seem to be present anymore
@UVLabs It's strange... The function "processCaption" is present on non-minified JS https://raw.githubusercontent.com/Codeinwp/Nivo-Slider-jQuery/master/jquery.nivo.slider.js
Anyway the fix of @serip88 works flawlessly, thank you!
nivo-caption div is displayed whether there is content to be displayed or not, and I have an overlay background on it with some animation, so if I have a slide with no caption, I have this empty overlay.
I tried using the callbacks to make the bg transparent if it doesn't have any content, but none of them trigger at an appropriate time for that.