Foundation Accordion需要偶尔重新加载页面;点击时并不总是打开

时间:2015-12-11 21:53:38

标签: jquery css zurb-foundation zurb-foundation-5

我使用foundation-rails gem安装了Foundation 5。我对手风琴有一些奇怪的行为,我需要排除故障。 (我没有更改默认安装中的任何内容。)

  1. 手风琴随机无法打开。当发生这种情况时,页面上的所有手风琴都不会起作用,即使你导航到另一个页面,该页面上的所有手风琴都不会起作用。但是,如果您使用ctl-r重新加载页面,则它们都会重新开始工作。
  2. 当点击另一个时,手风琴无法关闭窗口,就像设置了multi_expand: true一样。
  3. 点击手风琴可以打开/关闭内容,但不会关闭其他内容。
  4. 我正在制作嵌套手风琴。生成代码的示例:

    <ul class='accordion' data-accordion>
    
        <!-- :partial => 'accordion' -->
        <li class="accordion-navigation">
            <a href="#panel563">§ 1910.1  Purpose and scope.</a>
            <div id="panel563" class="content">
                <div class="panel callout">
                    <div><a href="/standard/563/letters">Letters of Interpretation (1)</a></div> 
                    <p>§ 1910.1  Purpose and scope.</p>
                </div>
                <div>
    <!-- begin recursion -->
                    <ul class='accordion' data-accordion>
    
                        <!-- :partial => 'accordion' -->
                        <li class="accordion-navigation">
                            <a href="#panel564">§ 1910.1(a) Section 6(a) of the Williams-Steiger Occupational Safety and...</a>
                            <div id="panel564" class="content">
                                <div class="panel callout">
    
                                    <p>Section 6(a) of the Williams-Steiger Occupational Safety and Health Act of 1970 (84 Stat. 1593) provides that “without regard to chapter 5 of title 5, United States Code, or to the other subsections of this section, the Secretary shall, as soon as practicable during the period beginning with the effective date of this Act and ending 2 years after such date, by rule promulgate as an occupational safety or health standard any national concensus standard, and any established Federal standard, unless he determines that the promulgation of such a standard would not result in improved safety or health for specifically designated employees.” The legislative purpose of this provision is to establish, as rapidly as possible and without regard to the rule-making provisions of the Administrative Procedure Act, standards with which industries are generally familiar, and on whose adoption interested and affected persons have already had an opportunity to express their views. Such standards are either (1) national concensus standards on whose adoption affected persons have reached substantial agreement, or (2) Federal standards already established by Federal statutes or regulations.</p>
                                </div>
                                <div>
        <!-- begin recursion -->
    
        <!-- end recursion -->
                                </div>
                            </div>
                        </li>
                        <!-- end partial -->
    
    
                    </ul>
                    <ul class='accordion' data-accordion>
    
                        <!-- :partial => 'accordion' -->
                        <li class="accordion-navigation">
                            <a href="#panel565">§ 1910.1(b) This part carries out the directive to the Secretary of Labor...</a>
                            <div id="panel565" class="content">
                                <div class="panel callout">
    
                                    <p>This part carries out the directive to the Secretary of Labor under section 6(a) of the Act. It contains occupational safety and health standards which have been found to be national consensus standards or established Federal standards.</p>
                                </div>
                                <div>
        <!-- begin recursion -->
    
        <!-- end recursion -->
                                </div>
                            </div>
                        </li>
                        <!-- end partial -->
    
                    </ul>
    
    <!-- end recursion -->
                </div>
            </div>
        </li>
        <!-- end partial -->
    
    
    </ul>
    

0 个答案:

没有答案