diff --git a/themes/bootstrap3/templates/RecordTab/similaritemscarousel.phtml b/themes/bootstrap3/templates/RecordTab/similaritemscarousel.phtml index 1c75d365d4de0e93cf639c1ce9520337cbcb305d..99cc5e98bd8c9afa1403be662426060bcfe405a4 100644 --- a/themes/bootstrap3/templates/RecordTab/similaritemscarousel.phtml +++ b/themes/bootstrap3/templates/RecordTab/similaritemscarousel.phtml @@ -57,7 +57,9 @@ <? endif; ?> <? $script = <<<JS +var normalizeHeightCount = $('#similar-items-carousel img').length; function normalizeHeights() { + if(--normalizeHeightCount > 0) return; var tallest = 0; var items = $('#similar-items-carousel .hover-overlay'); items.each(function() { //add heights to array @@ -65,9 +67,9 @@ function normalizeHeights() { tallest = $(this).height(); } }); - items.css('min-height',tallest + 'px'); + items.css('min-height', (tallest+25) + 'px'); } $('#similar-items-carousel img').load(normalizeHeights); JS; ?> -<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET') ?> \ No newline at end of file +<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET') ?>