I want to check if a div with css class = "x" height = "auto". If yes, I want (with jquery script) to remove css-class = "a" from all elements using css-class = "y". If the script does not need to do anything. thanks
if ($('div.x').css('height') === 'auto') { $('.y').removeClass('a'); }
$(document).ready(function(){ if ($('div.x').css('height') === 'auto') { $('.y').removeClass('a'); } });
You may need to do this in every () call