Exiled - Gaming Romania este o comunitate bazata pe gaming-ul profesionist.


Delete post fara refresh

 



Vezi subiectul anterior Vezi subiectul urmator In jos   Mesaj • Pagina 1 din 1

Adi
#1

Sam Iul 05, 2014 2:28 am

Adi

Delete post fara refresh Lb053KT
Imagine Demo:
Delete post fara refresh Sss10


Nume: Delete post fara refresh
Functionalitate: Toate versiunile
Categorie: JavaScript

Primul pas: Administration Panel → Modules→ Html & Javascirpt Management  → Javascript Management  


Adaugam: 

  1. $(function () {

  2.    $(".post a[href*='mode=delete'][href*='p='][href*='tid=']").click(function (a) {

  3.       a.preventDefault();

  4.       var b = $(this).closest(".post");

  5.       !0 == confirm("Are you sure you want to delete ?") && $.post(this.href, {

  6.          confirm: 1

  7.       }, function (a) {

  8.          b.slideUp(function () {

  9.             b.remove();

  10.             $(".main-content.topic .post").length || location.replace($(".nav[href^='/f']:last")[0].href)

  11.          })

  12.       })

  13.    });

  14. });





Si gata

https://forumul-exiled.forumgratuit.ro
Adi
#2

Sam Iul 05, 2014 2:28 am

Adi

Delete post fara refresh Lb053KT
Cod:
rsara

https://forumul-exiled.forumgratuit.ro
Adi
#3

Sam Iul 05, 2014 8:29 pm

Adi

Delete post fara refresh Lb053KT
Cod:
jQuery(document).ready(function(){
jQuery('.postbody dl.codebox dd code').each(function(){
t=1;
if(this.innerHTML.indexOf('<br>')!=-1){
 t='';
 i=1;
while(i<=this.innerHTML.split('<br>').length){
 t+='\n'+i;
i++
};
jQuery(this).before('<pre>'+t+'</pre>');
}
});
});

https://forumul-exiled.forumgratuit.ro
Adi
#4

Sam Iul 05, 2014 8:31 pm

Adi

Delete post fara refresh Lb053KT
Cod:
.postbody dl.codebox dd{overflow-y:auto;overflow-x:auto;max-height:200px}.postbody dl.codebox pre{display:block;float:left;font-size:12px;line-height:15.199999809265137px;padding:5px;border-right:3px solid #6CE26C;margin-top:2px;color:#A8A5A5;margin-right:5px;font-family:Consolas,'Bitstream Vera Sans Mono','Courier New';padding-right:8px}.postbody dl.codebox code{overflow-y:hidden;overflow-x:hidden;max-height:none;font-family:Consolas,'Bitstream Vera Sans Mono','Courier New';background:url(http://i.imgur.com/eHvfR.png) repeat 0px 0px;padding-top:0px;margin-top:7px}

https://forumul-exiled.forumgratuit.ro
Continut sponsorizat
#5


Vezi subiectul anterior Vezi subiectul urmator Sus   Mesaj • Pagina 1 din 1