I'm unable to trigger a click on the body tag using jQuery using this:
$('body').click();
Even this fails:
$('body').trigger('click');
You should have something like this:
$('body').click(function() {
// do something here
});
The callback function will be called when the user clicks somewhere on the web page. You can trigger the callback programmatically with:
$('body').trigger('click');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With