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

If an afteradd fails then the element is reappended #1794

Closed
giacmir opened this issue May 15, 2015 · 2 comments
Closed

If an afteradd fails then the element is reappended #1794

giacmir opened this issue May 15, 2015 · 2 comments

Comments

@giacmir
Copy link

giacmir commented May 15, 2015

This stackoverflow question reveals a bug in the way that the afterAdd works.

The asking person tried to use the code provided in the foreach documentation page and the code was failing in a strange way because the code assumed the use of jquery.

The example had a list of item and a button that adds an item to the list providing a highlight effect to the added element.

Without jquery the new element is added, but the afteradd function fails because $ is undefined.
If the user clicks again the button then two elements are appended, three for the next click and so on.

see the Fiddle provided in question.

@brianmhunt
Copy link
Member

Great report, thanks @giacmir!

@mbest
Copy link
Member

mbest commented May 25, 2015

Thanks. This is fixed now.

@mbest mbest closed this as completed May 25, 2015
@rniemeyer rniemeyer mentioned this issue Aug 30, 2015
10 tasks
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

3 participants