Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 933 characters in body
Source Link

You can see it here[here][1].

best regards!

EDIT (here is the corrected code):

function doResize() { //alert('before: being ' + $('#beingContent').height()); //alert('before: questions ' + $('#questionsContent').height()); maxHeight = 0; var divs = jQuery("#questionsContent, #beingContent"); $.each(divs, function(){ var height = jQuery(this).height(); if(maxHeight<height) maxHeight = height; }); divs.height(maxHeight); $('#beingContent').css('height', maxHeight - 2); //alert('after: being ' + $('#beingContent').height()); //alert('after: questions ' + $('#questionsContent').height()); $("#root").css('visibility', 'visible'); } 

and the CSS:

#beingContent { padding:0 5px !important; border:1px solid black !important ;} 

That solved the alignment issue! Thanks. [1]: http://www.guygar.com/inception/nothingness/index.html

You can see it here.

best regards!

You can see it [here][1].

best regards!

EDIT (here is the corrected code):

function doResize() { //alert('before: being ' + $('#beingContent').height()); //alert('before: questions ' + $('#questionsContent').height()); maxHeight = 0; var divs = jQuery("#questionsContent, #beingContent"); $.each(divs, function(){ var height = jQuery(this).height(); if(maxHeight<height) maxHeight = height; }); divs.height(maxHeight); $('#beingContent').css('height', maxHeight - 2); //alert('after: being ' + $('#beingContent').height()); //alert('after: questions ' + $('#questionsContent').height()); $("#root").css('visibility', 'visible'); } 

and the CSS:

#beingContent { padding:0 5px !important; border:1px solid black !important ;} 

That solved the alignment issue! Thanks. [1]: http://www.guygar.com/inception/nothingness/index.html

deleted 49 characters in body
Source Link

I am new to this so I think I am missing something simple.

You can see it here.

As you can see from the message boxes the JavaScript is working fine but the two DIVs are not being resized to the same height.

The JavaScript I am using is this:

function doResize() {  { alert('before: being ' + $('#being').height());  alert('before: questions ' + $('#questions').height());   maxHeight = 0;  var divs = jQuery("#questions, #being");  $.each(divs, function () { var height = jQuery(this).height();   if(maxHeight<height)  (maxHeight < height) maxHeight = height; });    divs.height(maxHeight);  alert('after: being ' + $('#being').height());     alert('after: questions ' + $('#questions').height());      $("#main").css('visibility', 'visible');  } 

I call this function on document onload event.

Please guide me because this code is working on other pages!

best regards!

I am new to this so I think I am missing something simple.

You can see it here.

As you can see from the message boxes the JavaScript is working fine but the two DIVs are not being resized to the same height.

The JavaScript I am using is this:

function doResize() {  alert('before: being ' + $('#being').height());  alert('before: questions ' + $('#questions').height());   maxHeight = 0;  var divs = jQuery("#questions, #being");  $.each(divs, function(){ var height = jQuery(this).height();   if(maxHeight<height)  maxHeight = height; });    divs.height(maxHeight);  alert('after: being ' + $('#being').height());     alert('after: questions ' + $('#questions').height());      $("#main").css('visibility', 'visible');  } 

I call this function on document onload event.

Please guide me because this code is working on other pages!

best regards!

I am new to this so I think I am missing something simple.

You can see it here.

As you can see from the message boxes the JavaScript is working fine but the two DIVs are not being resized to the same height.

The JavaScript I am using is this:

function doResize() { alert('before: being ' + $('#being').height()); alert('before: questions ' + $('#questions').height()); maxHeight = 0; var divs = jQuery("#questions, #being"); $.each(divs, function () { var height = jQuery(this).height(); if (maxHeight < height) maxHeight = height; }); divs.height(maxHeight); alert('after: being ' + $('#being').height()); alert('after: questions ' + $('#questions').height()); $("#main").css('visibility', 'visible'); } 

I call this function on document onload event.

Please guide me because this code is working on other pages!

best regards!

Source Link

JQuery Same Height DIVs

I am new to this so I think I am missing something simple.

You can see it here.

As you can see from the message boxes the JavaScript is working fine but the two DIVs are not being resized to the same height.

The JavaScript I am using is this:

function doResize() { alert('before: being ' + $('#being').height()); alert('before: questions ' + $('#questions').height()); maxHeight = 0; var divs = jQuery("#questions, #being"); $.each(divs, function(){ var height = jQuery(this).height(); if(maxHeight<height) maxHeight = height; }); divs.height(maxHeight); alert('after: being ' + $('#being').height()); alert('after: questions ' + $('#questions').height()); $("#main").css('visibility', 'visible'); } 

I call this function on document onload event.

Please guide me because this code is working on other pages!

best regards!