jasonglisson
7/16/2014 - 5:58 PM

jQuery - Split text in an element using a character as the split point

jQuery - Split text in an element using a character as the split point

		jQuery('.amount-section label').each(function() {
			var data = jQuery(this).text();
			var arr = data.split('-');		
			jQuery(this).html('<div class="label-amount">'+arr[0] + '</div><div class="label-text">' + arr[1]+'</div>');			
		});