This happens to me quite often, so do what I do, write the group post, but don't send it, just go back to trying to solve it, if you can't solve it then click the send button :)

Michael Price wrote:

Hello again folks – as per usual, I managed to get this working five minutes later! So never mind, but thanks if you were going to take a look at it J

Regards,

Michael Price

*From:* jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] *On Behalf Of *Michael Price
*Sent:* 21 August 2009 11:12
*To:* jquery-en@googlegroups.com
*Subject:* [jQuery] Get inner class of event

Hi all,

Got a div on a page, and we want something to happen when a user clicks on the div. However, within the div is a link and we want something DIFFERENT to happen if they click on the LINK rather than anything else in the div. Clicking the link is triggering the div click code as well – I need to stop this which I thought I could do with e.stopPropagation(); on the link click handler, but it doesn’t seem to be working.

Is there any way to pick up via the div click handler that it was actually the LINK, and react in there instead, or am I taking the wrong approach?

Regards,

Michael Price


Reply via email to