equalizer isn't working on dev55 so using javascript to set equal heights based on
the tallest intro text for the featured events slider. also added fade in effect to
prevent seeing the elements height correct during page load
margin-right: 0; }
#event-feed-row {
+ opacity: 0;
padding: 43px 15px 39.5px; }
#event-feed-row .view-events-btn {
background: #5e9aa5; }
min-height: 45px;
color: #3b76c4; }
-body .feed-block {
- min-height: 377px; }
-
body .front-event-button {
position: absolute;
bottom: 3px;
<a href="{$siteBaseUrl}event-detail/{$event.name_slug}/"> <a href="{$siteBaseUrl}event-detail/{$event.name_slug}/"><div style='background: url("{$mainImgUrl}{$event.image}") no-repeat center center;background-size: contain;' class='image-container'></div></a></a>
<a class="front-event-link" href="{$siteBaseUrl}event-detail/{$event.name_slug}/"><h4 class="front-event-title">{$event.name}</h4></a>
- <p data-equalizer-watch>{$event.intro}</p>
+ <p class="event-intro-text">{$event.intro}</p>
{foreach from=$event.times key=myId item=i name=time}
{if $smarty.foreach.time.first}
});
}
}
+ $(window).on("load", function(){
+ equalheight = function(container){
+
+ var currentTallest = 0,
+ currentRowStart = 0,
+ rowDivs = new Array(),
+ $el,
+ currentDiv,
+ topPosition = 0;
+ $(container).each(function() {
+ $el = $(this);
+ $($el).height('auto');
+ topPosition = $el.position().top;
+ if (currentRowStart != topPosition) {
+ for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
+ rowDivs[currentDiv].height(currentTallest);
+ }
+ rowDivs.length = 0; // empty the array
+ currentRowStart = topPosition;
+ currentTallest = $el.height();
+
+ rowDivs.push($el);
+ } else {
+ rowDivs.push($el);
+ currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);
+ }
+
+ for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
+ rowDivs[currentDiv].height(currentTallest);
+ }
+ });
+ }
+ equalheight('.event-intro-text');
+ $('#event-feed-row').fadeTo('slow', 1);
+ });
check_window_width();
$(window).resize(function () {
check_window_width();
+ equalheight('.event-intro-text');
});
});
});
}
}
+ $(window).on("load", function(){
+ equalheight = function(container){
+
+ var currentTallest = 0,
+ currentRowStart = 0,
+ rowDivs = new Array(),
+ $el,
+ currentDiv,
+ topPosition = 0;
+ $(container).each(function() {
+ $el = $(this);
+ $($el).height('auto');
+ topPosition = $el.position().top;
+ if (currentRowStart != topPosition) {
+ for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
+ rowDivs[currentDiv].height(currentTallest);
+ }
+ rowDivs.length = 0; // empty the array
+ currentRowStart = topPosition;
+ currentTallest = $el.height();
+
+ rowDivs.push($el);
+ } else {
+ rowDivs.push($el);
+ currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);
+ }
+
+ for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
+ rowDivs[currentDiv].height(currentTallest);
+ }
+ });
+ }
+ equalheight('.event-intro-text');
+ $('#event-feed-row').fadeTo('slow', 1);
+ });
check_window_width();
$(window).resize(function () {
check_window_width();
+ equalheight('.event-intro-text');
});
});
}
}
#event-feed-row {
+ opacity: 0;
padding: 43px 15px 39.5px;
.view-events-btn {
background: $teal;
}
body .feed-block{
- min-height: 377px;
+// min-height: 377px;
}
body .front-event-button{
position:absolute;