sharepoint中根据“是/否(复选框)”的值显示隐藏指定栏

sharepoint中根据“是/否(复选框)”的值显示隐藏指定栏

function HideColumn(targetColumn, hideColumn) {  
 var columnObj = $("input[Title='" + hideColumn + "']");
 $("input[Title='" + targetColumn + "']").bind('click',function() { 
 if($(this).is(':checked')) {          
  columnObj.closest("tr").hide();
 }
 else {
  columnObj.closest("tr").show();
 }
 });   
}   
$(document).ready(function() {
 HideColumn('YourCheckboxcolumn','columntobehidden');
});

http://www.rjesh.com/2011/09/hide-column-in-sharepoint-custom-list.html 

posted @ 2014-10-29 17:10  十一月的柳叶  阅读(279)  评论(0编辑  收藏  举报