Recently I was working on one small project and I had to use minimum resources as it is accessible on mobile devices too. There was one requirement of equal height of two elements. So instead of depending of any third party code, I have created my own plugin with 649 bytes only!

Demo

Core function

$.nyeqh = function(selector1, selector2) {
  var obj1 = $(selector1);
  var obj2 = $(selector2);
  obj1.each(function(){
    var obj1_h = obj1.height();
    var obj2_h = obj2.height();
    if ( obj1_h > obj2_h ){ obj2.height( obj1_h ); }
    if ( obj2_h > obj1_h ){ obj1.height( obj2_h ); }
  });
  return this;
}

Usage of this plugin

<script type="text/javascript">
  $(function() {
    $.nyeqh('.selector_1', '.selector_2');
  });
</script>
<div id="eqh">
  <div class="selector_1">
    <p>Lorem ipsum ...</p>
  </div>
  <div class="selector_2">
    <p>Lorem ipsum dollar sit amet...</p>
    <p>Lorem ipsum dollar sit amet...</p>
  </div>
</div>

Don’t forget to include jquery core js before $.nyeqh function call !

Demo