$("a").val("USD").click(function(){
$('tr:nth-child(2) > td:nth-child(6)').replaceWith('<td>$6.38/month</td>');
$('tr:nth-child(3) > td:nth-child(6)').replaceWith('<td>$2.08/month</td>');
$('tr:nth-child(4) > td:nth-child(6)').replaceWith('<td>$4.99/month</td>');
$('tr:nth-child(5) > td:nth-child(6)').replaceWith('<td>$14.95/month</td>');
$('tr:nth-child(6) > td:nth-child(6)').replaceWith('<td>$2.84/month</td>');
$('tr:nth-child(7) > td:nth-child(6)').replaceWith('<td>$4.99/month</td>');
$('tr:nth-child(8) > td:nth-child(6)').replaceWith('<td>$12.46/month</td>');
$('tr:nth-child(9) > td:nth-child(6)').replaceWith('<td>$3.95/month</td>');
$('tr:nth-child(10) > td:nth-child(6)').replaceWith('<td>$4.30/month</td>');
$('tr:nth-child(11) > td:nth-child(6)').replaceWith('<td>$3.96/month</td>');
});
$("a").val("GBP").click(function(){
$('tr:nth-child(2) > td:nth-child(6)').replaceWith("<td>£4.08/month</td>");
$('tr:nth-child(3) > td:nth-child(6)').replaceWith("<td>£1.33/month</td>");
$('tr:nth-child(4) > td:nth-child(6)').replaceWith("<td>£3.19/month</td>");
$('tr:nth-child(5) > td:nth-child(6)').replaceWith("<td>£9.57/month</td>");
$('tr:nth-child(6) > td:nth-child(6)').replaceWith("<td>£1.82/month</td>");
$('tr:nth-child(7) > td:nth-child(6)').replaceWith("<td>£3.19/month</td>");
$('tr:nth-child(8) > td:nth-child(6)').replaceWith("<td>£7.98/month</td>");
$('tr:nth-child(9) > td:nth-child(6)').replaceWith("<td>£2.53/month</td>");
$('tr:nth-child(10) > td:nth-child(6)').replaceWith("<td>£2.75/month</td>");
$('tr:nth-child(11) > td:nth-child(6)').replaceWith("<td>£2.53/month</td>");
});
Screenshot before the click event of GBP
http://snag.gy/Pp8nb.jpg
Screenshot after the click event of GBP
http://snag.gy/LKvzM.jpg
As you can see although the currency is changing as desired, once it has been changed it can not be changed back, because the jquery is finished i have tried wrapping the code in a function and then calling it just before the end and it didn’t work, any input here would be much appreciated