Reputation: 4004
I want to bind a mouseout
call to two CSS selectors so that if I've moved my mouse from one AND the other element, then I call something else. Is this even possible?
Upvotes: 3
Views: 119
Reputation: 50019
$('.class1, .class2').mousemove(callbackFunction);
jQuery selectors work just like CSS. Just use a comma to separate the classes.
Upvotes: 0
Reputation: 187050
You can use something like
$("#selector1, #selector2").bind("mouseout", function(){
// code goes here
});
Read Multiple Selector (“selector1, selector2, selectorN”)
Upvotes: 5