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

Multiple Triggers for shape-overlays #1

Open
zrobe opened this issue Oct 19, 2017 · 3 comments
Open

Multiple Triggers for shape-overlays #1

zrobe opened this issue Oct 19, 2017 · 3 comments

Comments

@zrobe
Copy link

zrobe commented Oct 19, 2017

Hello,

Loving the work you did here but i'm kind of new to the programming scene and i was wondering if you could help me out in figuring how to have multiple triggers in one page for the overlay?
I tried using const elmHamburger = document.querySelectorAll('.hamburger, .somethingelse'); in the demo6.js but it doesn't work. As i said before, i'm still learning so any help would be greatly appreciated.

Do you have any tips on how i could get it to work?

Thanks,

  • Robert
@ykob
Copy link
Owner

ykob commented Oct 20, 2017

@zrobe

Hi

Opening and closing of overlay is controled by Overlay.toggle() method.
Rather than increasing number of getting hamburger elements, it is better that add a new event to other elements and execute toggle method in this.

@zrobe
Copy link
Author

zrobe commented Oct 20, 2017

Thank you for your quick reply,
If it's not too much to ask, could you maybe show me a code example?
For example: Let's say you would want to trigger the shape-overlay when clicking on the .demo-title as well as the hamburger menu, how would you go about achieving this?

It's a bit easier for me to learn/follow code and read documentation based on that rather than doing it the other way around.

@madeclik
Copy link

madeclik commented Dec 5, 2019

@zrobe
did you find a solution for your problem ?

because I would like to create a click closure on the menu tabs

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