试图折叠文字

时间:2015-07-12 22:16:13

标签: javascript html text collapsable

我正在使用此代码

<div>
    <fieldset class="majorpoints" onclick="majorpointsexpand($this.find('legend').innerHTML)">
    <legend class="majorpointslegend">Expand</legend>
    <div style="display:none" >
        <ul>
            <li></li>
            <li></li>
        </ul>
    </div>
</div>

当我将此代码的多个部分添加到页面时,它只打开第一个。

点击标题时,我需要大约20行文本打开和折叠。 如果对目的感兴趣我正在尝试清理一个简单的网页 http://www.cranebbc.org/what-we-believe

任何帮助都会很棒

0 个答案:

没有答案