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");
                }
        });
});

Reply via email to