What I need is something like this:
$('element1 or element2').mouseover(function()
{
$('element3').show(effects,blah);
});
I hope I just overlooked this possibility in the jQuery docs.
What I need is something like this:
$('element1 or element2').mouseover(function()
{
$('element3').show(effects,blah);
});
I hope I just overlooked this possibility in the jQuery docs.
Just use a ma to separate the selectors:
$('element1, element2').mouseover(function()
{
$('element3').show(effects,blah);
});
The ma is the CSS syntax for selector grouping.
You can do it with a ma in the selector, or you can use add
.
$('element1, element2').mouseover(...);
$('element1').add('element2').mouseover(...);
Sure, just as you can specify it in CSS, just use a ma-separated list:
$('.element1, .element2').mouseover(function() {
$('element3').show(effects,blah);
});