I have a div:
<div id="myDiv">This Div is Tracked</div>
I need a function to do the following:
Example:
checkSeveralEvents = () => {
if (myDivIsHovered || myDivIsClicked || myDivIsFocus) {
console.log(`myDiv has been ${eventHere}`);
}
}
How can I do this?
.fire('myDivIsChanged', {type: "focus"}),.fire('myDivIsChanged', {type: "clicked"})and catch it in one function, and then handle it, depends on type being passedcheckSeveralEvents? You might want to get familiar with how to react to a single event type first.