這些都是我需要刪除一些輸入字段,但我不能夠去除標籤標記jquery刪除div和以前的標籤?
<label class="prfx-row-title">Unique Selling Proposition </label>
<div class="prfx-row-content">
<input type="text" name="dynamic_usp[0][text]" placeholder="unique selling proposition " value="testing hello world" />
<span class="remove button">Remove USP</span>
</div>
$(".remove").live('click', function() {
$(this).parent().remove();
$(this).parent().prev('label.prfx-row-title').remove();
});
現在只有DIV被刪除,但不是標籤?
有人嗎?
'live' ...哇...過眼雲煙。 (注意:'live'在幾年前已被棄用,並且至少在一年前被刪除。) – 2014-10-06 17:38:24
@TJCrowder我幾乎每天都會看到'.live()',所以當我訪問它時:)它在1.7中被棄用,並在1.9中被刪除,如果我沒記錯的話。 – Regent 2014-10-06 17:41:19