Ok i’m trying to add a span into a p element with jquery…
The p is always the second from last p in the form….
$(".add").click(function() {
$("form > p:nth-child(2)").clone(true).insertBefore("form > p:last-child(-1)");
$("form > p:last-child(-1)").add('Remove').inserBefore("form > p:last-child(-1)");
});
Basically I clone the form that exists and then add a “remove” span to the end of it (which will be used to remove the form)… Cloning the form is fine but I can’t add the remove span!
This is what I have so far but it doesn’t seem to work and it’s giving me a headache any help?