How do I set width and height of a DIV based on another div?
This is how I've done it but it works only when the alert
is present??
var readyC = setInterval(function() {
if (Condition) {
$('#divAA').width($('#divBB').width()).height($('#divBB').height());
//alert($('#divBB').width()) // works when this is uncommented??
}
clearInterval(readyC);
}, 10);
EDIT:
Fixed typo:
$('#divBB'+i)
to $('#divBB')