English 中文(简体)
检查一下,在提及不同章节标题之前,是否曾两次或多次提及该章的标题? 然后适用不同类别
原标题:check to see if the Chapter Title has been referenced two or more times before a different Chapter Title is referenced? then apply a different class

我在一长篇大事中一刀切。 每当点击时,就显示四处隐藏案文的<代码>span。 由他们组成

1) chapter title
2) section number
3) point number

例如:政府3:15 OR Whitehouse 15:27 OR 立法1:38(超过90章)。

如果是的话,则试图看到某一章的标题在一行中发生两倍或两倍以上的情况,则除第一行外,每一类人都适用特定类别。

理由:在提及这些章节标题时,一开始就划一:

例如:(icon) Whitehouse 29:8,但如果在提及另一章标题之前提及该章的标题两次或多次,则我不希望第三章(etc.)节。

www.un.org/Depts/DGACM/index_spanish.htm 是否有任何人知道我会如何检查一下,看看是否在提及另一章标题之前参考了该章的标题两次或多次?

http://www.ohchr.org。

他谈到(icon)Whitehouse 3:15中的许多不公正,但主席说的是山code,whitehouse 4:2 and whitehouse 4:9。 当他看到他们准备开始<条码>19:4时,他说“欢迎本届会议”<条码>9:41,然后在<条码>3:8上打上总理。

最佳回答

概括在一组具有共同特性的圆面(或任何其他集装箱)中的所有参考资料,但在这种情况下,请说<代码>span.ref。

I ve got a basic edition of it as the following jsFiddle

每一章标题的超文本要求采用以下格式:

<span class="ref">
    <img src="..." />
    <span class="ref-title">Washington</span>
    1:23
</span>

接着使用以下简称:

$(document).ready(function(){

    // var to store the previous reference title
    var previousRefTitle =   ;

    // cycle through each reference on the page
    $( .ref ).each(function(){

        // if chapter title is the same as the previous reference
        if ($(this).children( .ref-title ).text() == previousRefTitle)
        {
            // change the class
            if ($(this).hasClass( ref ))
            {
                $(this).removeClass( ref );
                $(this).addClass( ref-following );    
            }
        }

        // if chapter title is new compared to the previous reference
        else
        {
            // update var for next iteration
            previousRefTitle = $(this).children( .ref-title ).text();
        }
    });

});
问题回答

暂无回答




相关问题
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.

热门标签