I have the following JavaScript where I have some lists:
var deleteLinks = $(\".remove-button .remove-from-cart\"); deleteLinks.on(\'click\', function(ev){
As I can see from your code, you need to compare innerText of the two objects and find the indices of missing elemnts.
var missing_indices = []; for(var i=0;i
Then use missing_indices to remove missing elements from currentHTML