Error javascript : <p>In console, I have this error. I use the latest jquery 3.1.</p>

<p>How to rectify this element ?</p>

<p>Thank you</p>

<p>typeError: window.on is not a function</p>

<pre><code>&lt;script&gt;(window).on('load', function (){var maxHeight=0;$(".equal-height").each(function(){if($(this).height()&gt;maxHeight){maxHeight=$(this).height();}});$(".equal-height").height(maxHeight);});&lt;/script&gt;
</code></pre>
