Thank you in advance:
This function works great when dropping a div from the first click function, but SHOULD NOT confirm the second click function in any capacity.
I can even activate the first click function as many times as I want.
What am I missing? I will tear my hair into it.
$('span[rel="confirm"]').click( function() {
$('.confirmbox').remove();
targetpath = $(this).attr("targetpath");
dbid = $(this).attr("dbid");
$(this).after('<div><span class="closeout">X</span>   Are you sure you want to <a href="index.php?cmd=deletesample&id=' + dbid + '&filetarget=' + targetpath + '">delete?</a></div>');
$('.confirmbox').show(200);
});
$('.closeout').click( function() {
$('.confirmbox').css('background-color', 'green');
});
source
share