Jquery: Confirm Box Loops On Every Page Refresh
I am looping through an array of data with each having there own delete button with class='delete_thereid'. when the page loads the delete button works fine.. now after the page lo
Solution 1:
You could try changing your deletePost
method,
Instead of iterating through a set of matching elements you can directly bind an event to them:
function deletePost () {
$("[class^=delete]").on("click", function(e) {
e.preventDefault ();
//stop_timer ();
if (confirmDelete()) {
$(form).die ("click");
$(form).unbind ().click();
//e.stopPropagation();//start_timer ();
}
});
}
Post a Comment for "Jquery: Confirm Box Loops On Every Page Refresh"