Skip to content
Snippets Groups Projects
Commit c58188e0 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Add 25px of padding to the height normalization. Improves responsiveness and visuals.

parent 725d60a2
No related merge requests found
......@@ -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') ?>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment