..if you remove the parents while you have them as selector in your for-loop
– on the first pass, all parents (up to html-tag) will be removed.. then the selector’s are gone.
– nothing to select for the next runs.
show your html.
what is the goal?
edit: $(‘#e-div-‘+i).length is true if the element exist
Viewing 5 posts - 1 through 5 (of 5 total)