Nieuw lid |
|
<td>
<input type="text" id="hashtag" value="555" name="hashtag" tabindex="1" class="wideinput" autocomplete="off" /> <a href="#" onclick="return false;" class="removeHashtag"><img src="images/layout/search_clear.gif" /></a>
</td>
<input type="text" id="hashtag" value="555" name="hashtag" tabindex="1" class="wideinput" autocomplete="off" /> <a href="#" onclick="return false;" class="removeHashtag"><img src="images/layout/search_clear.gif" /></a>
ik wil nu dynamisch heel deze td verwijderen dus heb ik:
function attachListeners() {
$(".addHashtag").live("click", addHashtag);
$(".removeHashtag").live("click", removeHashtag);
}
function removeHashtag(event) {
event.target.parent().remove();
}
function attachListeners() { $(".addHashtag").live("click", addHashtag); $(".removeHashtag").live("click", removeHashtag); } function removeHashtag(event) { event.target.parent().remove(); }
Maar er gebeurt niks. Wat doe ik verkeerd? |