CsharpBeginner CsharpBeginner - 1 year ago 73
HTML Question

Resize a group of divs in Jquery

I need to resize this group of divs. How can I accomplish this?

function resizePanelsToBiggest(){
var maxheight = 0;

var terms = $('.termPanel');

for(var i = 0;i<terms.length;++i){

terms[i].height = 500;

Answer Source

You are setting the CSS based on an element that has a class so you could set it in the CSS file or style section or do this.


The class selector grabs all of the element with that class and you set the stlye. No for loop needed.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download