tommasov

Untitled

May 25th, 2021 (edited)
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. setTimeout(function(){
  2.  
  3.     jQuery(function(){
  4.  
  5.         if(jQuery(".pagination").is(":visible")){
  6.  
  7.             jQuery("th:nth-child(2)").after("<th>Descrizione</th>");
  8.  
  9.             jQuery("td:nth-child(2)").each(function(){
  10.                 var reference = jQuery(this).text();
  11.  
  12.                 jQuery.ajax({
  13.                     type: "POST",
  14.                     url: "MIOURL",
  15.                     data: "reference=" + reference,
  16.                     dataType: "html",
  17.                     success: function(msg){
  18.                         jQuery(this).after("<td>"+msg+"</td>");
  19.                     },
  20.                     error: function(){
  21.                         console.log("Chiamata fallita, si prega di riprovare...");
  22.                     }
  23.                 });
  24.             });
  25.         }
  26.     });
  27.     }, 4000);
  28. }, 4000);
Add Comment
Please, Sign In to add comment