Div class =" clone"在HTML中

时间:2014-10-15 04:22:25

标签: php html css layout

我检查了我网站的元素,并注意到top-header的div有重复。

为什么会这样?

如何删除该克隆并保留原始的div top-header?

我的site

这是html:

 <div id="top-header" class="original" style="visibility: hidden;">

 <div id="top-header" class="cloned" style="position: fixed; top: 0px; margin-top: 0px; margin-left: 0px; z-index: 1; display: block; left: 0px; width: 1343px;">

PHP:

  <header id="masthead" class="site-header">
  <div id="top-header">
    <div class="ak-container">
        <div class="site-branding">

            <?php if ( get_header_image() ) { ?>
            <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
                <img src="<?php header_image(); ?>" alt="<?php bloginfo('name') ?>">
            </a>
            <?php } ?>              
        </div><!-- .site-branding -->

        <div class="right-header clearfix">
            <?php 
            do_action( 'accesspresslite_header_text' ); 
            ?>
            <div class="clearfix"></div>
            <?php
            /** 
            * @hooked accesspresslite_social_cb - 10
            */
            if($accesspresslite_settings['show_social_header'] == 0){
            do_action( 'accesspresslite_social_links' ); 
            }

            if($accesspresslite_settings['show_search'] == 1){ ?>
            <div class="ak-search">
                <?php get_search_form(); ?>
            </div>
            <?php } ?>
        </div><!-- .right-header -->

            <nav id="site-navigation" class="main-navigation <?php do_action( 'accesspresslite_menu_alignment' ); ?>">

            <h1 class="menu-toggle"><?php _e( 'Menu', 'accesspresslite' ); ?></h1>

            <?php wp_nav_menu( array( 
            'theme_location' => 'primary' ) ); ?>
    </nav><!-- #site-navigation -->

    </div><!-- .ak-container -->

 </div><!-- #top-header -->

  </header><!-- #masthead -->

1 个答案:

答案 0 :(得分:1)

查看您网站中包含的JS文件我可能会说.cloned和.original类都在 jq-sticky-anything.min.js

这是一个jquery插件。

此外,页面底部还有一个var内部元素 - 这很奇怪:

/* <![CDATA[ */

var sticky_anything_engage = {"element":"#masthead #top-header","topspace":"0","minscreenwidth":"0","maxscreenwidth":"999999","zindex":"1","debugmode":""}; /* ]]> */

也许某人为您插入。