I have the following code in a ready function. The if works fine, but keeps top: 0 forever. The else statement works for the cholder element, but not the openercheck. Please advise.
if($('.openercheck').prop('checked', false)){
$('.openercheck').css('top', '0px');
}
else{
$('.cholder').css('height', $('.slide'+classnumber).height()+12+'px');
$('.openercheck').css('top', $('.cholder').height()+'px');
}
setTimeout(function(){ $('.openercheck').css('top', $('.cholder').height()+'px'); },0)and let me know if that works. Also, try putting the code in a$(window).loadinstead of a$(document).readychangeevent-handler?