From e96d3583d5dc71a4bc919ee22e6a6bb12a638a23 Mon Sep 17 00:00:00 2001 From: Miron Ogrodowicz Date: Tue, 26 Jul 2011 00:28:45 +0200 Subject: [PATCH] added an custom attribute value, just pass it to captionAttribute --- jquery.nivo.slider.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jquery.nivo.slider.js b/jquery.nivo.slider.js index 7cec5d6..81c1145 100644 --- a/jquery.nivo.slider.js +++ b/jquery.nivo.slider.js @@ -92,8 +92,8 @@ // Process caption function 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(vars.currentImage.attr(settings.captionAttribute) != '' && vars.currentImage.attr(settings.captionAttribute) != undefined){ + var title = vars.currentImage.attr(settings.captionAttribute); if(title.substr(0,1) == '#') title = $(title).html(); if(nivoCaption.css('display') == 'block'){ @@ -673,6 +673,7 @@ captionOpacity: 0.8, prevText: 'Prev', nextText: 'Next', + captionAttribute : 'title', beforeChange: function(){}, afterChange: function(){}, slideshowEnd: function(){},