Imagine Demo:
Si gata
Nume: Delete post fara refresh
Functionalitate: Toate versiunile
Categorie: JavaScript
Primul pas: Administration Panel → Modules→ Html & Javascirpt Management → Javascript Management
Adaugam:
- $(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)
- })
- })
- });
- });
Si gata