Javascript-Equal-Height-Responsive-Rows
Javascript-Equal-Height-Responsive-Rows copied to clipboard
Causes scrolling slowness in IE 8
I know nobody wants to have to support IE 8, but using the .responsiveEqualHeightGrid method causes window scrolling to become unreasonably jerky.
It looks like syncHeights is being called continually, making IE 8 bug out.
Okay, so the problem is pretty well documented on Stack Overflow here.
My solution was to change $.fn.responsiveEqualHeightGrid to this:
$.fn.responsiveEqualHeightGrid = function() {
var _this = this;
function syncHeights() {
var cols = _this.detectGridColumns();
_this.equalHeightGrid(cols);
setTimeout(resizeListener,100);
}
var resizeListener = function(){
$(window).one('resize load', syncHeights);
}
resizeListener();
syncHeights();
return this;
};
})(jQuery);
I'll submit a pull request, though you might want to refactor my code if you don't like this particular solution.