What would be the best way to write
IF
$("#div1").click()
OR
$("#div2").hover()
THEN
{ do some function }
I know how to chain events together that share common element, but how would I do multiple events for multiple elements (and sorry if my terminology is incorrect!).
Thanks for your help!
edit: To clarify, I’m wondering if it is possible to have one function run when either of the two aforementioned events takes place. So if A or B happens then do C.
whats wrong with: