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

How to use jquery event delegation? #2

Open
muthumani-prabhu opened this issue Jun 29, 2017 · 1 comment
Open

How to use jquery event delegation? #2

muthumani-prabhu opened this issue Jun 29, 2017 · 1 comment

Comments

@muthumani-prabhu
Copy link

Hi @antonmedv

What if I want to use jquery event delegation instead of monkberry-events? what is the best approach from your point of view? Though I have had success in delegating events using jquery. But still would like to consider your words on this.

With jquery, I tried the below approach
$(this.nodes).on("click", '#gs-show-search', this.showSearch.bind(this))

Thanks
mani

@antonmedv
Copy link
Member

Hi, this approach is ok, just add top listener to root container or root nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants