app/assets/javascripts/carousels.js
"use strict"
function normalizeDashboardEquivalences() {
$('.dashboard-equivalences-component').each(function(){
var items = $('.carousel-item', this);
// reset the height
items.css('min-height', 0);
// set the height
var maxHeight = Math.max.apply(null,
items.map(function(){
return $(this).outerHeight()}).get() );
items.css('min-height', maxHeight + 'px');
});
}
$(window).on(
'load resize orientationchange',
normalizeDashboardEquivalences);