Answers for "react trigger click on element"

1

trigger a click on page load jquery

$("document").ready(function() {
	$("button").trigger('click');
});
Posted by: Guest on March-06-2020
7

javascript detect click outside element

var ignoreClickOnMeElement = document.getElementById('someElementID');

document.addEventListener('click', function(event) {
    var isClickInsideElement = ignoreClickOnMeElement.contains(event.target);
    if (!isClickInsideElement) {
        //Do something click is outside specified element
    }
});
Posted by: Guest on July-22-2019

Code answers related to "react trigger click on element"

Code answers related to "Javascript"

Browse Popular Code Answers by Language