Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(function () {
- const parent = "sppb-addon-1540062106475";
- const links = jQuery("#"+parent+" .custom-tab li a");
- let counter = 1;
- for (let x=0;x<links.length;x++) {
- let newID = links.eq(x).attr('id').slice(0, 14) + "-" + counter;
- console.log(newID);
- let newLink = links.eq(x).attr('href').slice(0, -1) + "-" + counter;
- console.log(newLink);
- if (jQuery(".custom-tab li a").eq(x).attr('href').slice(0, -1) == "#sppb-tab1-1") {
- newLink =links.eq(x).attr('href').slice(0, -2) + counter;
- }
- links.eq(x).attr('href',newLink);
- links.eq(x).attr('id',newID);
- links.eq(x).attr('aria-controls',newID);
- counter++;
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement