Skip to content

Commit

Permalink
Merge pull request #44 from M-a-r-i-a-n-n-e/patch-1
Browse files Browse the repository at this point in the history
Workaround for Ideal Image Slider captions
  • Loading branch information
opatut authored Mar 3, 2021
2 parents 52cf4ae + bcc6528 commit 30dcc96
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions assets/js/slider/iis-captions.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
IIS._addClass(caption, 'iis-caption');

var captionContent = '';
if (slide.getAttribute('title')) {
// commenting out the following lines as a workaround, because they produce a caption from the "alt"-attribute and the lines after add an image description, also with the same text from the "alt"-attribute, whereas the "title" attribute does not seem to get parsed at all:
/* if (slide.getAttribute('title')) {
captionContent += '<div class="iis-caption-title">' + slide.getAttribute('title') + '</div>';
}
} */
if (slide.getAttribute('data-caption')) {
var dataCaption = slide.getAttribute('data-caption');
if (dataCaption.substring(0, 1) == '#' || dataCaption.substring(0, 1) == '.') {
Expand All @@ -48,4 +49,4 @@

return IIS;

})(IdealImageSlider);
})(IdealImageSlider);

0 comments on commit 30dcc96

Please sign in to comment.