2012-03-04 24 views
0

下面的例子http://jsfiddle.net/LW5pw/我如何解决我的jQuery的onclick不会删除链接和每个函数不能加载当前数

<a href="#" onclick="removeShipping('#shipping-block-id'); return false;">Remove</a> 

删除链接无法正常工作时删除当前shipping-block-id股利。

同样在each(function(i)不会产生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); 
}); 

让我知道我该如何解决这个问题..

回答