How to use this code for columns

hi there

jQuery(document).ready(function($) {
var max = 0;
$("#x-section-4 .x-column").each(function(index, el) {
if( $(this).height() > max ){
max = $(this).height();
}
});
$("#x-section-4 .x-column").css(‘height’, max);
});

Tell me, please, how to use this code so that all columns have the same size

Hello There,

Thanks for posting in! The code given will only work for the section that has the section ID x-section-4. Normally the fourth section added in the page. To use it to all your sections and columns, please have it updated and use this:

jQuery(document).ready(function($) {
	var max = 0;
	$(".x-section .x-column").each(function(index, el) {
		if( $(this).height() > max ){
			max = $(this).height();
		}
	});
	$(".x-section .x-column").css('height', max);
});

Hope this helps. Kindly let us know.

thanks for your reply
I added this code to the main page cornerstone = JS, but it did not affect the columns. I’m a beginner can write a more detailed sequence of actions.

Hi There,

You can make the columns same height if you turn on its Marginless Columns option. That option is under the ROW’s configuration.

screenshot

Thanks,

That’s great. Thanks, I got it to work.

how to change the distance between columns?

Hi There,

Please provide your URL and let us know in more detail what you want to achieve.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.