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

Same selector cannot be used in two instances #23

Open
naugtur opened this issue Jan 20, 2016 · 2 comments
Open

Same selector cannot be used in two instances #23

naugtur opened this issue Jan 20, 2016 · 2 comments

Comments

@naugtur
Copy link
Owner

naugtur commented Jan 20, 2016

I don't think I can do much about it, because it's a clash with the CSS rules - there can be only one transition animation...

Maybe they can be shared. If not, insQ should throw an error when same selector is used again.

@naugtur
Copy link
Owner Author

naugtur commented Jan 13, 2017

Fix: make insQ aware there can be only one, merge functions set on the same selector and call both.
Throwing an error is easier thought...

@coleshirley
Copy link

I know this is an old thread but a solution would be that when you call

insertionQ('div.comment').every(comment => {
// do stuff
}

insertionQ('div.comment').every(comment => {
// do stuff 2
}

you can store the callbacks for both functions in an array. Then when the event is fired you loop through the stored callbacks.

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