I'm really at a loss here. I have the following code:
function AddHeightToBottom(footerHeight)
{
if ($('#myId1').length)
{
$('#myId1').height($('#myId1').height() + footerHeight);
}
console.log(('#myId2').length);
if ($('#myId2').length > 0)
{
var dHeight = $('#myId1').height();
var aHeight = $('.AF').height();
$('#myId1').height(dHeight + aHeight);
var newHeight = $('#myId1').height();
alert(newHeight);
}
else
{
alert('why?!??????');
}
}
$('#myId2').length is coming out to 1, as I'd expect. However, when it does the comparison
if(1 > 0)
it's doing thing 2 EVERY time and I have no idea why. Any help would be appreciated.
if/elseis not, itself, broken or misbehaving.