Bug Tracker

Opened 10 years ago

Closed 10 years ago

#12947 closed bug (notabug)

execution of next line starts before complete execution of remove function with fadeOut

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:


I was trying to remove element with the fadeOut effect with 1000ms, and next line of that is so much dependant on that removal that it was giving unwanted results, so I came to know that, this is happening because, execution of next line was starting before removal of element, which was taking 1000ms to remove. About my code, I am dynamically adding li elements which can be dynamically removed, each li has a unique id(item1, item2, item3.....), and there is a template of li present which will be cloned. When new element is added, it is checked whats the id of last element(not the template li) and it is added with the new id calculated from last element id. when any element is removed, again each li element is given with a new id to keep a serial. for eg there are three li element item1, item2, item3 suppose I remove item2 then item3 will be given id item2 jsfiddle=> http://jsfiddle.net/SZ4RR/

Look at the removal line, check with both the fadeOut removal line first and then with direct remove line. when I use fadeOut next line is executed before removal of li element which results in the element which is getting removed is also counted in the number of child on next line, which gives wrong behavior..where it should first complete execution of removal with fadeOut effect then it should go to the next line of counting childs.

Change History (1)

comment:1 Changed 10 years ago by dmethvin

Resolution: notabug
Status: newclosed

This description is somewhat confusing, but #1 is correct and #2 is not. If your expectation was that #2 should work then that is not a bug. If you need more help, ask on the forum.

Note: See TracTickets for help on using tickets.