Here an example http://jsfiddle.net/LW5pw/
<a href="#" onclick="removeShipping('#shipping-block-id'); return false;">Remove</a>
Remove link is not working to remove the current shipping-block-id div.
Also on each(function(i) won’t generate the current++ block number for name='shipping-price2', name='shipping-price3'
$newshipping.children("div").children("input").each(function(i) {
var $currentElem = $(this);
$currentElem.attr("name", $currentElem.attr("name") + current);
$currentElem.attr("id", $currentElem.attr("id") + current);
});
Let me know how do I fix this..
Your
shipping-templateshould beWorking demo http://jsfiddle.net/LW5pw/1/