jQuery selector work like CSS selector, when you want multiple elements, you use comma :
$("body, p").mouseenter(function () {....});
Question
I want to create a hover button when "body" or "p" is hover, that means either one of them will trigger the hover event, how do you do that?
I assumed is something like this?
$("body")||$("p").mouseenter(function () {....});
Solution
jQuery selector work like CSS selector, when you want multiple elements, you use comma :
$("body, p").mouseenter(function () {....});