File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 51
51
}
52
52
placeholders = placeholders . add ( $ ( '<div class="placeholder">' ) ) ;
53
53
} ) ;
54
- //console.log(captions);
55
- /*if(captions.length > 0)
56
- {
57
- captionContainer.append(captionContent).appendTo(overlay);
58
- }*/
54
+
59
55
captionContainer . append ( captionContent ) . appendTo ( overlay ) ;
60
56
// Hide the gallery if the background is touched / clicked
61
57
slider . append ( placeholders ) . on ( 'click' , function ( e ) {
283
279
284
280
// Show image in the slider
285
281
function showImage ( index , preload = false ) {
286
- //console.log(index);
287
- //hasCaption = typeof hasCaption !== 'undefined'? hasCaption:false;
282
+
288
283
// If the index is outside the bonds of the array
289
284
if ( index < 0 || index >= items . length ) {
290
285
return false ;
297
292
{
298
293
placeholders . eq ( index ) . html ( this ) ;
299
294
295
+ //only show the caption if the image isn't preloaded
300
296
if ( ! preload )
301
297
{
302
298
setTimeout ( function ( ) {
413
409
//fade in the caption container
414
410
captionContainer . css ( { 'bottom' :current_placeholder . height ( ) - current_img . height ( ) - current_img . position ( ) . top } ) . fadeIn ( 'slow' ) ;
415
411
}
416
- //console.log("show:",items.eq(idx));
412
+
417
413
418
414
419
415
}
You can’t perform that action at this time.
0 commit comments