From 6b2cbf44eef76fd75fd8f736f6f53fa8290bc97a Mon Sep 17 00:00:00 2001 From: Enrico Sorcinelli Date: Fri, 8 Jan 2016 16:53:40 +0100 Subject: [PATCH] Added 'captionsAttr' options in order customize image caption value --- src/js/jquery.bxslider.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/jquery.bxslider.js b/src/js/jquery.bxslider.js index a0a834b6..6b4e08dc 100644 --- a/src/js/jquery.bxslider.js +++ b/src/js/jquery.bxslider.js @@ -13,6 +13,7 @@ startSlide: 0, randomStart: false, captions: false, + captionsAttr: 'title', ticker: false, tickerHover: false, adaptiveHeight: false, @@ -722,7 +723,7 @@ // cycle through each child slider.children.each(function(index) { // get the image title attribute - var title = $(this).find('img:first').attr('title'); + var title = $(this).find('img:first').attr(slider.settings.captionsAttr); // append the caption if (title !== undefined && ('' + title).length) { $(this).append('
' + title + '
');