开发者

<tr> element remove() not working in second remove

开发者 https://www.devze.com 2023-04-08 17:29 出处:网络
I Have code like below : <tbody> <tr name=\"a02323232\"> <tr name=\"j03543434\"> </tbody>

I Have code like below :

<tbody>
<tr name="a02323232">
<tr name="j03543434">
</tbody>

first i want to remove element with :

$("tr[name='a02323232']").hide("slow");

second then i want to remove

$("tr[name='j03543434']").hide("slow");

in first try , its successfull to remove but in the second try its not working , then i trace that the mistake is the jquery still do remove() like the first try . so only just element i开发者_开发百科n the first try is removed . Maybe i wrong ? please help me .


If you use legal HTML, it seems to work for me here: http://jsfiddle.net/jfriend00/V8LCK/.

<table>
    <tbody>
        <tr name="a02323232"><td>1</td></tr>
        <tr name="j03543434"><td>2</td></tr>
    </tbody>
</table>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号