We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 490bcec commit 329c55eCopy full SHA for 329c55e
1 file changed
js/jquery.galleryview-3.0-dev.js
@@ -657,16 +657,17 @@ if (typeof Object.create !== 'function') {
657
658
autoShowOverlay: function(i) {
659
if (this.opts.overlay_visible == "auto") {
660
- if (
661
- this.gvImages[i].attrs.description.replace(/^\s+|\s+$/g, '') != '' &&
662
- this.gvImages[i].attrs.title.replace(/^\s+|\s+$/g, '') != ''
663
- )
664
- this.showOverlay()
665
- else
666
- this.hideOverlay()
667
-
+ // show the overlay if either the
+ // title or caption/description is not empty.
+ if ( this.gvImages[i].attrs.description.trim() ||
+ this.gvImages[i].attrs.title.trim()
+ ) {
+ this.showOverlay();
+ } else {
+ this.hideOverlay();
668
+ }
669
} else if (this.opts.overlay_visible) {
670
671
}
672
},
673
0 commit comments