나는 내 테이블 아래에 href 링크가 있고 그 링크를 클릭하여 테이블 행을 조작 할 수 있기를 원하지만 나는 그것을 얻을 수 없다! 여기
내가 뭔가하고 싶은 내 HTML<div>
<div> <a href="#remove" class="removelink" > remove </a> </div>
<table>
<tr> <td></td> </tr>
</table>
</div>
입니다 : 내가
$(this).parent().siblings('table')
에 의해 표를 얻을 수 있습니다
$('.removelink').click(function(){
$(this).parent().siblings('table tr:last').remove();
})
을하지만 난 뭔가에 의해 행을 얻을 질수 like
$(this).parent().siblings('table tr')
귀하의 jQuery 코드는 잘 작동합니다. JsFiddle http://jsfiddle.net/Yd49H/ –
@NullPointer를보십시오 : 이것은 어떤 이유로 든 전체 테이블을 제거합니다. –
@ Felix.Thanks .. 나는 그것을 깨닫지 못했습니다. –