Compatible with PHP 8.2
Like this plugin? Please consider leaving a 5-star review.
Equal Height Columns lets you easily equalize the height of various columns and elements.
Want to trigger the equalizing of the heights manually? No problem. You can skip entering a selector on the settings page and call the jQuery script yourself using one of two functions:
jQuery( '.selector' ).initEqualHeights(); // Or jQuery( '.selector' ).equalizeTheHeights();
The difference between these two functions is simply that initEqualHeights() will set up all the events for recalculating the heights when the window is resized or the global equalheights event is triggered, but equalizeTheHeights() will simply equalize the heights without involving any events.
Both functions take three optional arguments, the minimum height (number of pixels), maximum height, and the breakpoint (below which the heights will revert to their original size):
jQuery( '.selector' ).initEqualHeights( minHeight, maxHeight, breakPoint );
So an example might look like this:
jQuery( '.selector' ).initEqualHeights( 200, 500, 768 );
When entering a selector on the settings page or using the initEqualHeights() method this plugin also adds an event ‘equalheights’ to the window, allowing you to easily trigger the equalizing manually. This is useful if you have added new items to the page after it loads via AJAX. You can trigger the event like this:
jQuery( window ).trigger( 'equalheights' );
Another option for controlling which elements get equalized is the equal_height_columns_elements filter. This filter operates on the array of data that gets passed to the JS right before it is passed. This allows for developers to specify selectors that can’t be deleted from the settings page, and for programmaticly building selectors based on dynamic data. Here’s an example of how the filter can be used:
add_filter( 'equal_height_columns_elements', 'custom_ehc_elements' ); function custom_ehc_elements( $elements ) { $elements['element-groups']['custom'] = array( 'selector' => '.ehc-target', // Selector goes here. 'breakpoint' => '768', ); return $elements; }
The keys on the element-groups array used by selectors entered on the settings page will come in as numbered indexes, so to avoid collision it’s best to use named keys for any custom selectors (we’re using ‘custom’ in the example above, but any unique string will work).
This plugin is on Github and pull requests are always welcome.
On version 1.2.0 we are introducing a new feature (for now, only available via JavaScript) that resolves a common issue if the row number of certain elements varies across breakpoints when the number of columns change.
For example, if we have 2 columns for tablets and 3 columns for desktops, the third element in the group would be positioned on the second row for tablets but on the first row for desktops.
Before this new feature, the equal height would be based on all the elements from the group. Now you can have “subgroups” for each row, and recalculate when the number of columns in the rows change.
To use this new feature add the function once per breakpoint:
jQuery( document ).equalHeight( selector, columns, minWidth, maxWidth );
selector: The selector of the group of elements that you want to apply the equal height.
columns: The number of columns per row on the breakpoint.
minWidth: The minimum width of the breakpoint. Use 1 for mobile.
maxWidth: The maximum width of the breakpoint. You can leave empty for the biggest breakpoint.
The following example would apply equal height for headings with the class .demo-heading in a grid that has 1 column per row on mobile, 2 columns on tablet and 3 columns on desktop:
$( document ).equalHeight( '.demo-heading', 1, 1, 767 ); // 1 columns for 1px - 767px $( document ).equalHeight( '.demo-heading', 2, 768, 1024 ); // 2 columns for 768px - 1024px $( document ).equalHeight( '.demo-heading', 3, 1025 ); // 3 columns for 1025px (and above)
Starting from $0 per month.
Rating
Reviewers
41 reviews
Tags
Developed By
MIGHTYminnow
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Contact Form plugins for Wordpress
Maps plugins for Wordpress
Translation plugins for Wordpress
Chat plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Contact plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Forms plugins for Wordpress
Comments plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Comments plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Portfolio plugins for Wordpress
Video Player plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Inventory plugins for Wordpress
Testimonials plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Analytics plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Security plugins for Wordpress
Ads plugins for Wordpress
Music Player plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Membership plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Video Player plugins for Wordpress
Tabs plugins for Wordpress
Social Feeds plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Enrich Content & Increase User Engagement With a Social Votes App
Discover Issues, Improve User Experience & Gather Leads
Add interactivity, enhance design & convert more with Flip Cards
Impress Users, Enhance Your Website & Increase Engagement Using an Image Gallery
Easily display Medium blogs, engaging visuals, and enhanced user experience
Deliver Important Messages to Users & Improve Their Experience
Create Engaging Personality Quizzes with Custom Results & Design
Improve visibility & Increase attendance with the Events List Widget
Create and Customize Cards for Any Website Content
Enhance Design & Draw Attention to Images
Simplify the Subscription Process To Boost Engagement & Conversions
Showcase Your Vimeo Videos in a Stunning Carousel
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!