Advertisement
Guest User

salvemedica-przebieg

a guest
Jul 12th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  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. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement