Here is a simple function by which you can make two divs equal as table cells
Here is the code:-
Define the method
Call the method:
Here is the code:-
Define the method
fn.equalizeHeights = function(){
var equalHeight =Math.max.apply(this, $(this).map(function(i,e){ return $(e).height();}).get());
return this.height((id>=1 && id%2 ==0)?equalHeight-100:equalHeight);
}
var equalHeight =Math.max.apply(this, $(this).map(function(i,e){ return $(e).height();}).get());
return this.height((id>=1 && id%2 ==0)?equalHeight-100:equalHeight);
}
Call the method:
$(window).load(function(){
$('#leftmenu,#rightnav').equalizeHeights();
});
$('#leftmenu,#rightnav').equalizeHeights();
});
No comments:
Post a Comment