Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for Ideal Image Slider captions #44

Merged
merged 1 commit into from
Mar 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);