www.webdeveloper.com
Results 1 to 3 of 3

Thread: how do I disable capture phase

  1. #1
    Join Date
    Apr 2010
    Location
    Brooklyn NY
    Posts
    104

    how do I disable capture phase

    I've got a div element id='layer' which holds another div id='frame'. I'm trying to make it so when 'layer' is clicked it initiates an event and not it's children ('frame').

    I'm using jQuery and this is what I have for it

    $('#layer').click(function() {
    $('#layer').hide();
    $('#frame').empty();
    delete this;
    });

  2. #2
    Join Date
    Aug 2007
    Posts
    3,767
    One of the nice features of jQuery is that it implements the w3c standard regarding events. You'll want to check is e.target equal.id equal to "layer" or something similar. And this is probably the event bubbling more than capturing (I can't say that with absolute certainty because I don't know how jQuery assigns events), but that's irrelevant.
    Last edited by Declan1991; 08-22-2010 at 07:10 PM.
    Great wit and madness are near allied, and fine a line their bounds divide.

  3. #3
    Join Date
    Apr 2010
    Location
    Brooklyn NY
    Posts
    104
    figured it out.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles