Page 1 of 1

jQuery

Posted: Thu Jul 12, 2007 4:23 pm
by alex.barylski
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. :)

Posted: Fri Jul 13, 2007 4:29 pm
by RobertGonzalez
Can I recommend downloading and playing with the jQuery starter kit. That was a life saver for me, and it will allow you to not have to use the disclaimer "I've yet to *really* use jQuery" so we can trust that you have tried something before asking. ;)