[英]Show/ Hide Table Column without hiding table header using jQuery
I have a code that hide and show in http://jsfiddle.net/kZFqA/ want to hide only the column not header .also when hiding column i want to show that Show Associate inside the header .when i again click Show Associate it will disappear from header and to show the hidden column.. 我有一个隐藏并显示在http://jsfiddle.net/kZFqA/中的代码,只想隐藏列而不是标题。当隐藏列时,我也想显示在标题内显示关联。再次单击显示关联时将从标题中消失,并显示隐藏的列。
Please any one answer how to d that... 请任何人回答如何...
$('.associateHide').live("click", function (e) {
e.preventDefault();
var hideClass = associateHideClass;
associateHTMLElements = HideSection(hideClass, associateStartElementString);
$('.btnAssociate').show();
});
Just remove your classes (such as tableColGroupAssociate
and tableColGroupTransaction
) from the th
element and add it directly to your td
elements. 只需从
th
元素中删除您的类(例如tableColGroupAssociate
和tableColGroupTransaction
),然后将其直接添加到您的td
元素中即可。
I hope it helps you. 希望对您有帮助。
Use table body
<tbody>content here</tbody>
$(".associateHide tbody").hide(); //use hide and show
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.