To be very honest, I do use adblocker. Still, some websites trust solely on the ads to pay for hosting and expenses and give us great benefits in return.

To detect if adblocker is activated we have to check if our adverts div is set to 0.
What we need to do is put our adverts in a div with the class advert

 

<div class="advert">
<!-- Here your advert(s)-->
</div>

Now, lets us check if AdBlocker put our adverts down.

The jQuery version

function detectAdBlock()
{
     if ($('.advert').height() == 0)
     {
           alert('AdBlock is enabled');
     }
}
window.onload = detectAdBlock;

And a plain Javascript version

function detectAdBlock()
{
     if (document.getElementsByClassName('advert')[0].style.height.toFloat() == 0) {
           alert('AdBlock is enabled');
     }
}
window.onload = detectAdBlock;

This script checks on the pageload and checks what happend to the div with the class advert. If this is set to 0, we will display a alert.

Ofcourse, don’t use an alert, but perhaps show a div or something