Advertisement
tommasov

Untitled

May 25th, 2021
735
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(index){
  10.                 let row = jQuery(this); //Oggetto attuale, index รจ uguale a indice numerico da 0
  11.                 let reference = row.text();
  12.  
  13.                 jQuery.ajax({
  14.                     type: "POST",
  15.                     url: "MIOURL",
  16.                     data: "reference=" + reference,
  17.                     dataType: "html",
  18.                     success: function(msg){
  19.                         row.after("<td>"+msg+"</td>");
  20.                     },
  21.                     error: function(){
  22.                         console.log("Chiamata fallita, si prega di riprovare...");
  23.                     }
  24.                 });
  25.             });
  26.         }
  27.     });
  28. }, 4000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement