diff --git a/src/js/justifiedGallery.js b/src/js/justifiedGallery.js index 13fa85bc..13619c3b 100755 --- a/src/js/justifiedGallery.js +++ b/src/js/justifiedGallery.js @@ -160,7 +160,7 @@ JustifiedGallery.prototype.imgFromEntry = function ($entry) { /** @returns {jQuery} the caption in the given entry */ JustifiedGallery.prototype.captionFromEntry = function ($entry) { - var $caption = $entry.find('> .caption'); + var $caption = $entry.find('> .jg-caption'); return $caption.length === 0 ? null : $caption; }; @@ -236,7 +236,7 @@ JustifiedGallery.prototype.displayEntryCaption = function ($entry) { var caption = $image.attr('alt'); if (!this.isValidCaption(caption)) caption = $entry.attr('title'); if (this.isValidCaption(caption)) { // Create only we found something - $imgCaption = $('
' + caption + '
'); + $imgCaption = $('
' + caption + '
'); $entry.append($imgCaption); $entry.data('jg.createdCaption', true); } @@ -271,7 +271,7 @@ JustifiedGallery.prototype.isValidCaption = function (caption) { JustifiedGallery.prototype.onEntryMouseEnterForCaption = function (eventObject) { var $caption = this.captionFromEntry($(eventObject.currentTarget)); if (this.settings.cssAnimation) { - $caption.addClass('caption-visible').removeClass('caption-hidden'); + $caption.addClass('jg-caption-visible').removeClass('jg-caption-hidden'); } else { $caption.stop().fadeTo(this.settings.captionSettings.animationDuration, this.settings.captionSettings.visibleOpacity); @@ -287,7 +287,7 @@ JustifiedGallery.prototype.onEntryMouseEnterForCaption = function (eventObject) JustifiedGallery.prototype.onEntryMouseLeaveForCaption = function (eventObject) { var $caption = this.captionFromEntry($(eventObject.currentTarget)); if (this.settings.cssAnimation) { - $caption.removeClass('caption-visible').removeClass('caption-hidden'); + $caption.removeClass('jg-caption-visible').removeClass('jg-caption-hidden'); } else { $caption.stop().fadeTo(this.settings.captionSettings.animationDuration, this.settings.captionSettings.nonVisibleOpacity); diff --git a/src/less/justifiedGallery.less b/src/less/justifiedGallery.less index 623f136d..5a9ab2b6 100644 --- a/src/less/justifiedGallery.less +++ b/src/less/justifiedGallery.less @@ -44,7 +44,7 @@ .opacity(0); } - > .caption { + > .jg-caption { & when (@caption-initial-opacity = 0) { display: none; } @@ -65,7 +65,7 @@ font-family: sans-serif; } - > .caption.caption-visible { + > .jg-caption.jg-caption-visible { display: initial; .opacity(@caption-visible-opacity); .transition(opacity);