I've done some searching around and i'm trying to find the observed event for when a particular navbar item is clicked.

The goal is to run some code for whenever that navbar item is selected but I do not want this piece of code to run on the other navbar items. Is an observer the correct way of achieving this?

  • 1
    There is no magento events for a DOM element action, you should try javascript to achieve this may be with ajax call when an element is clicked and so. Feb 12, 2019 at 10:40
  • 1
    Ahh that makes sense. I will give that a go instead cheers for the fast response. -A Feb 12, 2019 at 10:44
  • You're welcome :) Feb 12, 2019 at 10:44


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.