i have 100 links has an id='a-list-*'
user will added a list link unknown number < 100
has an id='e-list-*'
if a user added a 10 lists i have 90 links left in my code so i need to remove it When I run this code I get an error .
for (var i = 0; i < 100; i++) { $( '#e-list-'+i ).clone().appendTo('#a-list-'+i); if ($('#e-div-'+i).length) { $( '#a-list-'+i).parents().remove(); } }