All pastes #813513 Raw Edit

Stuff

public text v1 · immutable
·published 2007-12-12 16:21 UTC
rendered paste body
function listingTable() {
  var listingEl = jQuery(".list li");
  if (jQuery(listingEl).size() < 1) { return 0; }
  jQuery(listingEl).each(
    function(i) {
      var heightBlockMax=0;
      block1 = jQuery(".list li:eq(" + i + ")");
      block2 = jQuery(".list li:eq(" + (i+1) + ")");
      if (block2) {
        heightBlock1 = block1.height();
        heightBlock2 = block2.height();
        heightBlockMax = (heightBlock1 > heightBlock2) ? heightBlock1 : heightBlock2;
        block1.css("height",heightBlockMax);
        block2.css("height",heightBlockMax);
      }
      var listingElTextLnks = jQuery("div:eq(0)",this);
      if (jQuery(listingElTextLnks).size() > 0) {
          var padd = Math.ceil( (jQuery(this).height() - jQuery(listingElTextLnks).height()) / 2 -1);
          jQuery(listingElTextLnks).css("padding", padd + "px 0 0 0");
      }
    }
  );
  return 1;
}