Prepend Columns to Table

by Brad Patton

HTML

<table class="sg-table  " border="0" cellpadding="0" cellspacing="0">
			<thead class="sg-header-row-first"><tr><th class="sg-first-cell"><span class="sg-access-helper">9. How satisfied are you with how FranConnect helps you across the franchising lifecycle?</span></th><th class="sg-second-cell" id="col-10087">Not applicable</th><th id="col-10088">Not at all satisfied</th><th id="col-10089">Slightly satisfied</th><th id="col-10090">Moderately satisfied</th><th id="col-10091">Very satisfied</th><th class="sg-last-cell" id="col-10092">Completely satisfied</th></tr></thead>			<tbody>
											<tr class="sg-odd-row sg-first-row row-66 ">
										<th class="sg-first-cell" id="row-66" scope="row">Sales</th>
											
													<td class="sg-second-cell"><input class="sg-input sg-input-radio" name="sgE-3008799-6-66" id="sgE-3008799-6-66-10087" value="10087" title="Sales: Not applicable" type="radio"><label for="sgE-3008799-6-66-10087"></label></td>
												
												
													<td><input class="sg-input sg-input-radio" name="sgE-3008799-6-66" id="sgE-3008799-6-66-10088" value="10088" title="Sales: Not at all satisfied" type="radio"><label for="sgE-3008799-6-66-10088"></label></td>
												
												
													<td><input class="sg-input sg-input-radio" name="sgE-3008799-6-66" id="sgE-3008799-6-66-10089" value="10089" title="Sales: Slightly satisfied" type="radio"><label for="sgE-3008799-6-66-10089"></label></td>
												
												
													<td><input class="sg-input sg-input-radio" name="sgE-3008799-6-66" id="sgE-3008799-6-66-10090" value="10090" title="Sales: Moderately satisfied" type="radio"><label for="sgE-3008799-6-66-10090"></label></td>
												
												
													<td><input class="sg-input sg-input-radio" name="sgE-3008799-6-66" id="sgE-3008799-6-66-10091" value="10091" title="Sales: Very satisfied" type="radio"><label for="sgE-3008799-6-66-10091"></label></td>
												
												
													<td...

JavaScript

$(function() {
	$('.sg-access-helper').html("New Module Name");
  
$('.sg-table tr:first').prepend("<td></td><td>Former Product Name</td>");

	$('.row-66').prepend("<td>Develop - Sell more franchises</td><td>Franchise Sales Manager</td>");
  $('.row-67').prepend("<td>Open - Reduce days to first dollar</td><td>Franchise Opened</td>");
  $('.row-68').prepend("<td>Engage - Make all units successful</td><td>Intranet</td>");
  $('.row-69').prepend("<td></td><td>Online training</td>");
  $('.row-70').prepend("<td></td><td>Help Desk & Franchisee Support</td>");
  $('.row-71').prepend("<td>Perform - Gain visibility, outperform</td><td>Franchise Information Manager</td>");
  $('.row-72').prepend("<td></td><td>Performance Wise</td>");
  $('.row-73').prepend("<td></td><td>Financial</td>");
  $('.row-74').prepend("<td>Market - Build your brand</td><td>Zcubator</td>");
  
});