English 中文(简体)
单列单只包含1个要素(在共享点)
原标题:Hiding Groupings Only Containing 1 Element (in Sharepoint)

我有一个包含几百个集团的股东名单。 一些集团只包含1行,在这种情况下,我想删除上面的集团头。

为此,我认为,我需要用“Qu”掩盖所有法典。 我想说的是逻辑,这样可以看一看“和”部分;(1),如果它发现,它隐藏着TBODY。 任何想法? 不确切地确定如何开始这项工作。

<TBODY id="titl1-2_" groupString=""><TR><TD colspan="100" class="ms-gb"  nowrap><img src="/_layouts/images/blank.gif" alt="" height=1 width=0><a href="javascript:" onclick="javascript:ExpCollGroup( 1-2_ , img_1-2_ );return false;"><img id="img_1-2_" src="/_layouts/images/minus.gif" alt="Expand/Collapse" border="0"></a>&nbsp;<a href="javascript:" onclick="javascript:ExpCollGroup( 1-2_ , img_1-2_ );return false;">Grouping1</a> :&nbsp;Accurint <span style="font-weight: lighter">&#8206;(1)</span></TD></TR></TBODY>
最佳回答

这可能给你一个想法:

$(document).ready(function() {
  $("tbody[id^= tit ] .ms-gb span").each(function() {
 //console.log(" " + $(this).text() + " "); 
 if($(this).text().indexOf("(1)") > -1)
 {
  $(this).closest("tbody").hide(); // hides the header
 }
  });
});

如果扩大你的团体,这将变得更加复杂。 我建议迫使他们倒塌,以避免寻找这些物品的尚待改装的拖箱。

问题回答

这.。 原来的回答是有效的。 我也做了一些工作。 这可能是这样做的有益方式,但它在某种程度上与 j合。

<script type="text/javascript">
$(document).ready(function(){

var RowOnly = $("TBODY span:contains( (1) )").each(function(){
var HideParen1 = $(this);
var HideName = $(this).parent();
HideParen1.css("display", "none");
HideName.css("display", "none");
});

});
</script>




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签