rexjiang92
1/5/2016 - 11:38 PM

replace word using javascript

replace word using javascript

jQuery('#block-contentlist .team-member').each(function(){
  element = jQuery(this).find('.field--name-field-role-title');
  textToReplace = element.text();
  newText = textToReplace.replace("| Wealth Manager", "");
  element.text(newText); 
});