dom節點生成與刪除

$(function(){
		$(".wfk").click(function(){
			$(this).attr('show',parseInt($(this).attr('show')*(-1)));
			if($(this).attr('show')==1){
				$(".infoshow").hide();
				$(this).parent().parent().parent().find('tr[class=infoshow]').remove()
				$(this).parent().parent().after("<tr class='infoshow'><td colspan=12>232131231</td></tr>")

			}else{
				$(this).parent().parent().next().remove()
			}
		})								
	})
相關文章
相關標籤/搜索