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
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
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 that within a each() call