使用jQuery将TD隐藏到DIV中 [英] Hide TD into DIV Using jQuery

查看:93
本文介绍了使用jQuery将TD隐藏到DIV中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试隐藏所有TD的div,但仅将文本隐藏到div中,而不隐藏TD标签,有人知道如何解决此问题?我的代码是:

I'm Trying to Hide an div with all TD But Only hide the text into the div and no hide the TD tags somebody know how to fix this? My Code is:

jQuery代码:

$('div#default_results').hide();

HTML代码:

<div id='default_results'>
Div Content
<td class='rand_code'>
TD Content
</td>
</div>

结果:

<td class='rand_code'>
TD Content
</td>

推荐答案

这不是有效的标记. td之间不能有div或文本.您必须重组页面才能实现目标.

This is not valid mark-up. You can not have divs or text between td's. You will have to restructure your page to achieve whatever the goal is.

这篇关于使用jQuery将TD隐藏到DIV中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆