I don't know ur use-case, but why are u using body.click... Instead it could be very easy, intuitive and smaller to use
$("#test h2").click(function() { alert("test"); }); -GTG On 8/17/07, Jones <[EMAIL PROTECTED]> wrote: > > > Hi, > > I've got a problem with event bubbling. > > That works fine: > > $(function() { > $("body").click(function(e) { > if ($(e.target).is("h2")) { > alert("Test"); > } > }); > }); > > But now I want something like that: > > $(function() { > $("body").click(function(e) { > if ($(e.target).is("#test h2")) { > alert("Test"); > } > }); > }); > >