Hello All -

I am stumped with the following problem - within an each() loop it
seems that this.height() is not working - or - more likely - I am
doing something so obviously wrong I cannot see it :) Here is the
code:

function adjustRowHeights() {
        var maxH = 0;
        console.log('Array Size=' + masterEngLangArray.length);  // this is
OK - reports "15"
        for (id in masterEngLangArray) {
                console.log(id+'='+$(".formRow-"+id).height());   //this is OK
reports height "17"
                maxH = 0;
                $(".formRow-"+id).each(function() {
                        if (this.height() > maxH) {               // PROBLEM -- 
here
Firebug reports error: "this.height() is not a function"
                                maxH = this.height();
                                }
                });
                $(".formRow-"+id).height(maxH);
        }
}

The DOM looks like this:

<div style="overflow: auto;" id="langEditForm">
  <div class="langEditorTableHeader" id="langEditFormEng">
    <div style="width: 100%;" id="langEditFormEngHeader"> Programmer's
Reference: English </div>
    <div class="formRow-0 langEditFormEngCell">AADashboard</div>
    <div class="formRow-1 langEditFormEngCell">Account</div>
    <div class="formRow-2 langEditFormEngCell">Bulgarian</div>
    <div class="formRow-3 langEditFormEngCell">Dashboard</div>
    <div class="formRow-4 langEditFormEngCell">Diplomacy</div>
    <div class="formRow-5 langEditFormEngCell">Economy</div>
    <div class="formRow-6 langEditFormEngCell">English</div>
    <div class="formRow-7 langEditFormEngCell">Help</div>
    <div class="formRow-8 langEditFormEngCell">Login</div>
    <div class="formRow-9 langEditFormEngCell">Register</div>
    <div class="formRow-10 langEditFormEngCell">Spanish</div>
    <div class="formRow-11 langEditFormEngCell">Strategy</div>
    <div class="formRow-12 langEditFormEngCell">Tactics</div>
    <div class="formRow-13 langEditFormEngCell">Translate From:</div>
    <div class="formRow-14 langEditFormEngCell">Translate To:</div>
  </div>
  <div class="langEditorTableHeader" id="langEditFormFrom">
    <div style="width: 100%;" id="langEditFormFromHeader">Achinese</
div>
    <div class="formRow-0 langEditFormFromCell">undefined</div>
    <div class="formRow-1 langEditFormFromCell">AccountACE</div>
    <div class="formRow-2 langEditFormFromCell">Bulgarian</div>
    <div class="formRow-3 langEditFormFromCell">Dashboard</div>
    <div class="formRow-4 langEditFormFromCell">Diplomacy</div>
    <div class="formRow-5 langEditFormFromCell">Economy</div>
    <div class="formRow-6 langEditFormFromCell">English</div>
    <div class="formRow-7 langEditFormFromCell">Help</div>
    <div class="formRow-8 langEditFormFromCell">Login</div>
    <div class="formRow-9 langEditFormFromCell">Register</div>
    <div class="formRow-10 langEditFormFromCell">Spanish</div>
    <div class="formRow-11 langEditFormFromCell">Strategy</div>
    <div class="formRow-12 langEditFormFromCell">Tactics</div>
    <div class="formRow-13 langEditFormFromCell">Translate From:</div>
    <div class="formRow-14 langEditFormFromCell">Translate To:</div>
  </div>
  <div class="langEditorTableHeader" id="langEditFormTo">
    <div style="width: 100%;" id="langEditFormToHeader"> To-Langauge:
Choose One </div>
  </div>
</div>

Reply via email to