Jquery if then statement for css value

css, javascript, jquery

Solution

if ($('div.x').css('height') === 'auto') {
    $('.y').removeClass('a');
}

Problem

I want to check whether a `div` with a CSS `class="x"` has `height="auto"` If yes I want (with a jQuery script) the `css-class="a"` removed from all elements with the `css-class="y"` If not the script does not have to do anything. Thanks

Original source