jquery - Blueimp Gallery - Thumbnail Indicator Issue -
i use jquery version of blueimp gallery. use lazy load on slideshow page load thumbnails user scrolls. since thumbnails not loaded @ initial page load , thumbnails below fold won't display @ blueimp gallery's thumbnail indicator, set data-thumbnail attribute on link tags this:
<a href="photos/1-full.jpg" data-thumbnail="photos/1-thumb.jpg"> <img data-original="photos/1-thumb.jpg" alt="image 1" /> </a>
however, still seems try load thumbnail src attribute of image tag, placeholder image set lazy load.
am doing right?
this involves changing blueimp gallery script itself. changes below:
--- a/js/blueimp-gallery-indicator.js +++ b/js/blueimp-gallery-indicator.js @@ -58,10 +58,10 @@ thumbnail; if (this.options.thumbnailindicators) { thumbnail = obj.getelementsbytagname && $(obj).find('img')[0]; - if (thumbnail) { - thumbnailurl = thumbnail.src; - } else if (thumbnailproperty) { + if (thumbnailproperty) { thumbnailurl = this.getitemproperty(obj, thumbnailproperty); + } else if (thumbnail) { + thumbnailurl = thumbnail.src; } if (thumbnailurl) { indicator.style.backgroundimage = 'url("' + thumbnailurl + '")'; }
and propagating change minified files.
Comments
Post a Comment