Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event listener on menu icons #1

Open
hassanItani opened this issue Jan 2, 2016 · 3 comments
Open

event listener on menu icons #1

hassanItani opened this issue Jan 2, 2016 · 3 comments
Assignees

Comments

@hassanItani
Copy link

hey dude, how can i handle the click on menu icons

@roccomuso
Copy link

Here's my silly solution, given one menu icon:

<li class="c-circle-nav__item">
  <a href="#" class="c-circle-nav__link" onClick="events.emit('clickHome');">
    <img src="assets/img/menu_icon/house.svg" alt="">
  </a>
</li>

of course you can specify whatever function you want on the HTML onClick attribute.

@callmenick
Copy link
Owner

Simple solution, but I'd rather refactor into something more robust. Definitely some kind of option that takes a callback, and leverage a data attribute of some sort. I'll pen this in as a feature.

@callmenick callmenick self-assigned this Jan 11, 2016
@ElliGator
Copy link

A little late, but you can also just add an event listener to the menu items

@callmenick callmenick mentioned this issue Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants