1545 Views
09-Feb-2018
Free updates
Free support
No transaction fee
PayPal IPN
JQuery made it very easy for us for detecting if a user's browser has any adblock extension enabled. Adblock is a great extension for users but painful for website admins because for most web admins, ads the only source of income. According to me, if those ad blockers only white listed adsense ads, it would have been great because other advertising networks got some very tricky ads and specially those annoying popup ads.
<script type="text/javascript">
$(document).ready(function(e) {
var height = $('.ad-area').height();
if(height < 5)
{
$('.response').html("<span style='color:red;'>Ad blocker is enabled!</span>");
}
else
{
$('.response').html("<span style='color:green;'>No ad blocker found!</span>");
}
});
</script>