jQuery
Posted: Thu Jul 12, 2007 4:23 pm
Can I capture the onclick event and traverse the DOM from the point of the event until I reach a parent with an ID of specified value?
Here is my situation:
I have some columns and menus, etc. Because they are using absolute, etc when I wrap them in special tags, the tags don't push on the container so an inline onclick on the wrapping element doesn't work. The wrapping tag is a special tag (not part of HTML specs) so it doesn't need to render I simply need to use the DOM to determine if the click occurred inside of what would normally be the wrapping element.
Make sense?
Anyways, I've yet to *really* use jQuery so an example in as plain English as possible would be ideal.
Here is my situation:
I have some columns and menus, etc. Because they are using absolute, etc when I wrap them in special tags, the tags don't push on the container so an inline onclick on the wrapping element doesn't work. The wrapping tag is a special tag (not part of HTML specs) so it doesn't need to render I simply need to use the DOM to determine if the click occurred inside of what would normally be the wrapping element.
Make sense?
Anyways, I've yet to *really* use jQuery so an example in as plain English as possible would be ideal.