I have a div class called siteads where i put js-adbanners in
I have another div id called adblockmessage
<div class="siteads"><!-- js-code goes here --></div>
<div id="adblockmessage"><!-- adblock message goes here --></div>
What I want to do should be simple; check the height of .siteads and if is 0px display #adblockmessage as a block (or show / hide)
What I did is this:
function blockAdblockUser() {
if ($('.siteads').height() == 0) {
$('#adblockmessage').show();
else
$('#adblockmessage').hide();
}
}
$(document).ready(function(){
blockAdblockUser();
});
Can any jQuery captain solve this in seconds please? Thanks in advance!