I got this code to delete topic posts without reload the page
But the problem is that i need to remove the .pun .posthead too because as u see at the image, when i delete a post the .pun .posthead with the username is still there:
- Spoiler:
- Code:
$(function () {
$(".post a[href*='mode=delete'][href*='p='][href*='tid=']").click(function (a) {
a.preventDefault();
var b = $(this).closest(".post");
!0 == confirm("Are you sure you want to delete ?") && $.post(this.href, {
confirm: 1
}, function (a) {
b.slideUp(function () {
b.remove();
$(".main-content.topic .post").length || location.replace($(".nav[href^='/f']:last")[0].href)
})
})
});
});
But the problem is that i need to remove the .pun .posthead too because as u see at the image, when i delete a post the .pun .posthead with the username is still there: