jQuery

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

jQuery

Post 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. :)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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. ;)
Post Reply