What is the best way to ensure that all colums inside a 3-column row are the same height and all that the content does not spill out of the boxes in the event a user resizes their browser. Currently I am doing it the way described below but X Pro is going beserk and opening multiple instances of its Content Window every time I save the code and then go back and try to open the PAGE again. The only way around this is to quickly try and click JS, select it, delete it, save the page before the next version opens… if i miss this then it does it over and over again until I do this in time - it’s quite funny unless you have this problem - X Pro then becomes unusable.
Please tell me if there is a way to do this and how. The main thing I wish to do is to keep all three columns equal size and to make sure that user resizing the browser (for example when going portrait to landscape or simply dragging the browser window smaller or larger) can do this without the content spilling outside the boxes (which is does without the resize refresh. Any better suggestions would be much appreciated. Thanks.
Code used as follows
CLASS = equalise
//refresh page on browser resize
$(window).bind(‘resize’, function(e)
{
console.log(‘window resized…’);
this.location.reload(false); /* false to get page from cache /
/ true to fetch page from server */
});
// keep columns in row equal size
(function($){
$(window).bind(‘ready load resize’, function(){
var max = 0,
mobile = $(window).width();
if ( mobile > 767 ){ $(".equalize .x-column").each(function(index, el) { if( $(this).height() > max ){ max = $(this).height(); } }); $(".equalize .x-column").css('height', max); }
});
})(jQuery);