When I clone something, I want to clone it as a duplicate consecutive element and add a separate identifier to it.
Doesn’t work: $(".selecter").clone().after(".selecter").addClass('.selecter2');
jQuery should make a .cloneAs() or something..
What can we do about this?
From what I can tell by your question, it seems like you want to use
.insertAfterrather than.after.Note also that
addClassshould contain only the class name, which presumably doesn’t contain a dot.Demo