Lines 1401-1419
Link Here
|
1401 |
// Loop over each container in the template which contains covers |
1401 |
// Loop over each container in the template which contains covers |
1402 |
$(".cover-slider").each(function( index ){ |
1402 |
$(".cover-slider").each(function( index ){ |
1403 |
var lightbox_descriptions = []; |
1403 |
var lightbox_descriptions = []; |
|
|
1404 |
var first_shown = 0; |
1404 |
$(this).find(".cover-image").each( function( index ){ |
1405 |
$(this).find(".cover-image").each( function( index ){ |
1405 |
var div = $(this); |
1406 |
var div = $(this); |
1406 |
// Find the image in the container |
1407 |
// Find the image in the container |
1407 |
var img = div.find("img")[0]; |
1408 |
var img = div.find("img")[0]; |
1408 |
if( img && $(img).length > 0 ){ |
1409 |
if( img && $(img).length > 0 ){ |
1409 |
var description = ""; |
1410 |
var description = ""; |
1410 |
if( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ){ |
1411 |
console.log(img.naturalHeight); |
|
|
1412 |
if( img.naturalHeight == 0 ){ |
1411 |
// No image loaded in the container. Remove the slide |
1413 |
// No image loaded in the container. Remove the slide |
1412 |
div.remove(); |
1414 |
div.remove(); |
1413 |
} else { |
1415 |
} else { |
1414 |
// All slides start hidden. If this is the first one, show it. |
1416 |
// All slides start hidden. If this is the first one, show it. |
1415 |
if( index == 0 ){ |
1417 |
if( first_shown == 0 ){ |
1416 |
div.show(); |
1418 |
div.show(); |
|
|
1419 |
first_shown = 1; |
1417 |
} |
1420 |
} |
1418 |
// Check if Amazon image is present |
1421 |
// Check if Amazon image is present |
1419 |
if ( div.attr("id") == "amazon-bookcoverimg" ) { |
1422 |
if ( div.attr("id") == "amazon-bookcoverimg" ) { |
1420 |
- |
|
|