javascript - How Does One Trigger Click Event When Link Is Above Another Link? -


I have a link cover that contains a picture and paragraph on one page, there is another link on it < / P>

When I click on the link, the event handler is triggered for the link below.

How do I trigger an event handler for the above link?

Edit:

To be more specific, the link below is actually being handled by bubbling up your container, and the container The handler has been triggered.

The above link contains a code that is triggered by a handler that searches for its data-attribute feature.

  - JavaScript $$ ('.list') .invoc ('inspection', 'click', function (event) {var clicked optimal = event.findElement ('a') ; If (clicked item) {var href = clickedItem.readAttribute ('href'); new Ajax.Updater ('extension', href, {method: 'get'});} event.stop ();}) ; - HTML & lt; A href = "/ items / 1" & gt; & Lt; Img src = "/ person.jpg" /> & Lt; P & gt; Michael Knight & lt; / P & gt; & Lt; / A & gt; & Lt; A href = "/ item / 1" class = "delete" data-method = "delete" & gt; Destroy & lt; / A & gt; The Holller code was not posted for the  

NB deletion link, but it is a standard click handler that searches for the data-mode attribute.

Could you post code if you have a unique way to trigger event handler ID You can always use the ID at run time to check that this is what you want or not


Comments