This might work better with filter() (untested): $('*').filter('#main, #main *').mouseover(function() {
}); -Hector On Thu, Nov 20, 2008 at 8:07 AM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > Hi, > > I want to apply a mouseover event on all elements but one and its > children. I can't use class name to filter. How can I do it ? I've > tried unsuccessfully : > > $("*:not(#main)").not($("#main").children()).mouseover(function() { > > }); > > thanks