OK got the delete working, here is the final function:
$(document).ready(function(){
$(':checkbox.addPhoto').click(function(){
if ($(this).attr('checked')) {
// Add element to form
$("#post",
parent.document.body).append("");
} else {
// Delete element from form
$("#post input[id='" +
$(this).attr('id') + "']",
parent.document.body).remove();
}
});
});
--
View this message in context:
http://www.nabble.com/Iframe---adding-and-removing-hidden-form-elements-tp25343500s27240p25450789.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.