Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- $('.stgroups a').each(function(){
- var color = $(this).css('color');
- var name = $(this).text();
- var clase = $(this).text().slice(0,20).replace(/\s/g, '').toLowerCase().replace(/'/g, "").replace(/\(|\)/g, "");
- var censo = $(this).attr('title');
- var censonumbers = censo.match(/\d+/g).map(Number);
- var resta = censonumbers[0] - 1;
- $(this).attr('style', '--group:'+color+';');
- $(this).parent('b').replaceWith(this);
- $(this).addClass('gr'+clase).removeClass('gensmall').removeAttr('title');
- $(this).html('<em></em><span>'+name+'</span><i></i>');
- if ($(this).is('.grstaff')) {
- $(this).find('i').html(censonumbers[0]);
- } else {
- $(this).find('i').html(resta);
- }
- });
- $('.stgroups').each(function(){
- var content = $(this).children('a');
- $(this).html(content);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement