cmoreira

team showcase table hacks

Aug 1st, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery(document).ready(function(){
  2.  
  3. jQuery('.tshowcase-box-table tr').each(function(){
  4.     var row = jQuery(this);
  5.  
  6.     // add line breaks to school list
  7.     row.find('.tshowcase-table-groups').each(function(){
  8.         var newline = jQuery(this).html();
  9.         jQuery(this).html(newline.split(',').join('<br>'));
  10.         });
  11.  
  12.     // move credentials to name/title
  13.     var spancontainer = jQuery('<span></span>').append(row.find('td > a')).append(row.find('.tshowcase-single-credentials'));
  14.  
  15.     //row.find('td > a').appendTo(spancontainer);
  16.     //row.find('.tshowcase-single-credentials').appendTo(spancontainer);
  17.  
  18.     spancontainer.appendTo(row.find('.tshowcase-table-image'));
  19.  
  20.     //delete 2nd and 5th column
  21.     row.find("td:nth-child(2)").remove();
  22.     row.find("th:nth-child(2)").remove();
  23.     row.find("td:nth-child(4)").remove();
  24.     row.find("th:nth-child(4)").remove();
  25. });
  26. jQuery('.tshowcase-box-table th').first().html('Social Workers');
  27. jQuery('.tshowcase-box-table').fadeTo('fast',1);
  28.  
  29. });
Add Comment
Please, Sign In to add comment