Here's my function:
document.querySelector('body').addEventListener('click',e=>{getRandomImagePair()});
When I click anywhere on the body something happens. I have two div
s .more
and .wd
and if I click on them the function getRandomImagePair()
executes. How can I make so that if I click the links the function doesn't fire?
I tried this below, it works but then the .more
div won't trigger another needed different function.
$('.more, .wd').on('click', function(event) {
event.stopPropagation();
});