---
{
	"title": "Equal height",
	"language": "en",
	"category": "Plugins",
	"categoryfile": "plugins",
	"description": "A plugin for responsive equal height.",
	"altLangPrefix": "equalheight",
	"dateModified": "2014-08-04"
}
---
<span class="wb-prettify all-pre hide"></span>

<section>
	<h2>Purpose</h2>
	<p>Equalises the height of elements that are on the same baseline.</p>
</section>

<section>
	<h2>Use when</h2>
	<ul>
		<li>Elements of varying heights are displayed on the same baseline.</li>
	</ul>
</section>

<section>
	<h2>Do not use when</h2>
	<p>No known use cases when this plugin should not be used.</p>
</section>

<section>
	<h2>Working example</h2>
	<p><a href="../../../demos/equalheight/equalheight-en.html">Working example of the equal height plugin</a></p>
	<div lang="en">
		<h2>Evaluation and report</h2>
		<ul>
			<li>Accessibility pre-assessment #1
				<ul>
					<li><a href="../../../demos/equalheight/reports/a11y-1-en.html" hreflang="en"><span class="wb-inv">Pre-assessment #1</span> English report</a></li>
					<li><a href="../../../demos/equalheight/reports/a11y-1-fr.html" hreflang="fr"><span class="wb-inv">Pre-assessment #1</span> French report</a></li>
				</ul>
			</li>
			<li>Accessibility assessment #1
				<ul>
					<li><a href="../../../demos/equalheight/reports/a11y-2-en.html" hreflang="en"><span class="wb-inv">Assessment #1</span> English report</a></li>
					<li><a href="../../../demos/equalheight/reports/a11y-2-fr.html" hreflang="fr"><span class="wb-inv">Assessment #1</span> French report</a></li>
				</ul>
			</li>
		</ul>
	</div>
</section>

<section>
	<h2>How to implement</h2>
	<ol>
		<li>Add the class <code>wb-eqht</code> to the element that contains the elements for which you want the height to be equal.</li>
		<li>Add the class <code>hght-inhrt</code> to the nested element for which you want the height to be equal.</li>
		<li>Add the class <code>eqht-trgt</code> to the equalize element. It the same as applying <code>hght-inhrt</code> up to the child of <code>wb-eqht</code>.</li>
	</ol>
</section>

<section>
	<h2>Configuration options</h2>
	<p>There are no configuration options.</p>
</section>

<section>
	<h2>Events</h2>
	<table class="table">
		<thead>
			<tr>
				<th>Event</th>
				<th>Trigger</th>
				<th>What it does</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td><code>wb-init.wb-eqht</code> (v4.0.5+)</td>
				<td>Triggered manually (e.g., <code>$( ".wb-eqht" ).trigger( "wb-init.wb-eqht" );</code>).</td>
				<td>Used to manually initialize the Equal heights plugin. <strong>Note:</strong> The Equal heights plugin will be initialized automatically unless the required markup is added after the page has already loaded.</td>
			</tr>
			<tr>
				<td><code>wb-update.wb-eqht</code> (v4.0.5+)</td>
				<td>Triggered manually (e.g., <code>$( ".wb-eqht" ).trigger( "wb-update.wb-eqht" );</code>).</td>
				<td>Used to manually trigger an update yo the height equalization. <strong>Note:</strong> The Equal heights plugin will be automatically update the height equalization on window, text and zoom resizes as well as DataTable draws.</td>
			</tr>
			<tr>
				<td><code>wb-ready.wb-eqht</code> (v4.0.5+)</td>
				<td>Triggered automatically after the height equalization has been initialized.</td>
				<td>Used to identify when height equalization was initialized
					<pre><code>$( document ).on( "wb-ready.wb-eqht", function( event ) {
});</code></pre>
				</td>
			</tr>
			<tr>
				<td><code>wb-updated.wb-eqht</code> (v4.0.5+)</td>
				<td>Triggered automatically each time the height equalization is updated.</td>
				<td>Used to identify when height equalization was updated
					<pre><code>$( document ).on( "wb-updated.wb-eqht", function( event ) {
});</code></pre>
				</td>
			</tr>
			<tr>
				<td><code>wb-ready.wb</code> (v4.0.5+)</td>
				<td>Triggered automatically when WET has finished loading and executing.</td>
				<td>Used to identify when all WET plugins and polyfills have finished loading and executing.
					<pre><code>$( document ).on( "wb-ready.wb", function( event ) {
});</code></pre>
				</td>
			</tr>
		</tbody>
	</table>
</section>

<section>
	<h2>Source code</h2>
	<p><a href="https://github.com/wet-boew/wet-boew/tree/master/src/plugins/equalheight">Source code for the equal height plugin on GitHub</a></p>
</section>
