File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 }
5252 placeholders = placeholders . add ( $ ( '<div class="placeholder">' ) ) ;
5353 } ) ;
54- //console.log(captions);
55- /*if(captions.length > 0)
56- {
57- captionContainer.append(captionContent).appendTo(overlay);
58- }*/
54+
5955 captionContainer . append ( captionContent ) . appendTo ( overlay ) ;
6056 // Hide the gallery if the background is touched / clicked
6157 slider . append ( placeholders ) . on ( 'click' , function ( e ) {
283279
284280 // Show image in the slider
285281 function showImage ( index , preload = false ) {
286- //console.log(index);
287- //hasCaption = typeof hasCaption !== 'undefined'? hasCaption:false;
282+
288283 // If the index is outside the bonds of the array
289284 if ( index < 0 || index >= items . length ) {
290285 return false ;
297292 {
298293 placeholders . eq ( index ) . html ( this ) ;
299294
295+ //only show the caption if the image isn't preloaded
300296 if ( ! preload )
301297 {
302298 setTimeout ( function ( ) {
413409 //fade in the caption container
414410 captionContainer . css ( { 'bottom' :current_placeholder . height ( ) - current_img . height ( ) - current_img . position ( ) . top } ) . fadeIn ( 'slow' ) ;
415411 }
416- //console.log("show:",items.eq(idx));
412+
417413
418414
419415 }
You can’t perform that action at this time.
0 commit comments