Anzeige zum Schließen von JQuery erhalten
document.querySelector('#adbox').onclick = function() {
this.style.display = 'none';
};
fancyNancy
document.querySelector('#adbox').onclick = function() {
this.style.display = 'none';
};
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<div id="adbox"> ad code goes here </div>
<div id="adbox"> ad code goes here </div>
$('#adbox').on('click', function() {
$(this).hide();
});