SHARE
TWEET

salvemedica-przebieg

a guest Jul 12th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery(function () {
  2.     const parent = "sppb-addon-1540062106475";
  3.     const links = jQuery("#"+parent+" .custom-tab li a");
  4.     let counter = 1;
  5.     for (let x=0;x<links.length;x++) {
  6.         let newID = links.eq(x).attr('id').slice(0, 14) + "-" + counter;
  7.         console.log(newID);
  8.         let newLink = links.eq(x).attr('href').slice(0, -1) + "-" + counter;
  9.         console.log(newLink);
  10.         if (jQuery(".custom-tab li a").eq(x).attr('href').slice(0, -1) == "#sppb-tab1-1") {
  11.             newLink =links.eq(x).attr('href').slice(0, -2) + counter;
  12.         }
  13.        links.eq(x).attr('href',newLink);
  14.        links.eq(x).attr('id',newID);
  15.        links.eq(x).attr('aria-controls',newID);
  16.         counter++;
  17.     }
  18. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top