English 中文(简体)
j Query 平等身高一栏
原标题:Equal height columns in jQuery

我正在寻找一个以平等身高为基的支架。 我知道,其中有许多在座,但my要求是比平线的。 我想在Mega Menu使用这些设备,那里大约是4-5人,每下降3-4人。

我希望这三至四栏均具有同等高度,但并不是所有下级,因为根据该栏的内容,其他下级的高度将有所不同。

我在MooTools找到了解决办法,符合我的要求。 下面的“MooTools”法规定,特定 d子中的所有栏目均等于其母体高。

www.un.org/Depts/DGACM/index_spanish.htm The MooTools Code :

var Equalizer = new Class({
 initialize: function(elements) {
  this.elements = $$(elements);
 },
 equalize: function(hw) {
  if(!hw) { hw =  height ; }
  var max = 0,
   prop = (typeof document.body.style.maxHeight !=  undefined  ?  min-  :   ) + hw; //ie6 ftl
   offset =  offset  + hw.capitalize();
  this.elements.each(function(element,i) {
   var calc = element[offset];
   if(calc > max) { max = calc; }
  },this);
  this.elements.each(function(element,i) {
   element.setStyle(prop,max - (element[offset] - element.getStyle(hw).toInt()));
  });
  return max;
 }
});

<<>Usage>:

var columnizer = new Equalizer( .sizeMe ).equalize( height ); //call .equalize() as often as you want!

有些人可以帮助我把这部法律改写在酒吧。 实际上,我的整个模板都以“质量”为基础,而仅仅为了这一平等职能,我不想再装上另一个“ Java”图书馆。

Kind!

最佳回答
问题回答

暂无回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签