JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<div class="navigation">
<a href="#">Some Link</a>
<a href="#">Some other Link</a>
</div>
<div class="page-body">
<p>
Disrupt jean shorts viral hella meh, plaid cupidatat magna art party. Echo Park adipisicing literally narwhal. Williamsburg leggings church-key, craft beer forage cornhole jean shorts blue bottle pariatur. Officia sapiente bespoke, locavore plaid cray voluptate deep v ex <a href="#">vinyl tote bag</a> chillwave swag occaecat.
</p>
<a href="#">a standalone link</a>
</div>
CSS
.navigation {height:100px;background-color:green;}
JavaScript
$('body').click(function(event){
alert('click');
if ($(event.target).closest('.navigation').length) {
return; //do nothing if event target is in the navigation
} else {
// do something if the event target is outide the navigation
$('.navigation').css('background-color', 'red');
}
});