Block all body evets except one

<html>
<body class="someClass">
<a href="thanks.html">test</a>

<a href="thanks.html" class="clickable">test</a>
</body>
</html>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script type="text/javascript">
$('body').click(function(e) {
//with jquery
	if($(e.target).hasClass('clickable')){
           
            return;
        }

     e.preventDefault();
     return;
      

    });
</script>

PURE JS

<html>
<body class="someClass" onclick=pp(event)>
<a href="thanks.html">test</a>

<a href="thanks.html" class="clickable">test</a>
</body>
</html>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script type="text/javascript">
function pp(e){

if((e.target).getAttribute('class')=='clickable'){
           
            return;
        }
     e.preventDefault();
     return;
      

}
</script>