Jquery if then statement for css value
$(document).ready(function(){
if ($('div.x').css('height') === 'auto') {
$('.y').removeClass('a');
}
});
You may need to do that within a each() call
if ($('div.x').css('height') === 'auto') {
$('.y').removeClass('a');
}