Last active
August 29, 2015 14:27
-
-
Save kennyledet/3b0d48ffb116161ff5cd to your computer and use it in GitHub Desktop.
Legacy code for dynmically calculating and setting CSS prop for min-height on results container of product grid items
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( $(window).width() <= 720 ) { | |
var _card = $('.product-grid-item'); | |
var cardLen = _card.length; | |
var cardHeight = _card.height(); | |
var totalCardHeight = cardLen * cardHeight; | |
$('#results-container').css('min-height', (totalCardHeight+cardHeight) +'px'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment