2014-09-25 49 views
0

我正在使用Bootstrap折叠区来隐藏信息,直到面板折叠。我必须告诉你我的网站,因为我不能在JSfiddle中重新创建问题,因为它在那里工作,但不在我的网站上...WordPress不会删除Bootstrap的'collapse'类'

我最近做了一个WordPress主题的这个网站,虽然崩溃在静态网站上工作,它不适用于WordPress。请看: jsfiddle ---- the wordpress site

  <!-- g3 --> 

       <div class="row"> 
        <div class="well main-wells"> 

         <h2 class="text-center"><a href="javascript:void(0)" data-toggle="collapse" data-target="#g3">About</a></h2> 

         <div id="g3" class="collapse g3"> 

          <div class="container-fluid"> 
           <div class="col-sm-6"> 
            <img src="<?php get_template_directory_uri() ?>/assets/img/me.png" class="img-responsive" alt=""> 
           </div> 
           <div class="col-sm-6"> 
           <p>I combine technology and design to make great user experiences. Having worked in different businesses in various roles, I am accustomed to rapidly changing technology. I enjoy working in challenging environments and learning new technology. Over the years, I learned to meet my objectives through organization and contributing creativity, knowledge, and recommendations based on the needs of the task.</p> 
           <hr><h4>Mission</h4> 
           <blockquote>To produce innovative, value intensive products by cultivating my creativity and capabilities with dedication, while always supporting the bigger, common goal.</blockquote> 
          </div><!-- row --> 
           </div> 


         </div> <!-- g3/collapse --> 
        </div><!-- well --> 
       </div><!-- row --> 

      <!-- g3 end --> 

当你点击按钮,面板打开,但是当你再次点击“中的”类不会删除,因为它应该。

任何想法为什么'in'类不会像在JSfiddle中那样在WP网站上删除。 ?

+0

如果此代码在小提琴工作,但不是您的网站,那么它不必与此代码。 – 2014-09-25 18:56:45

回答

1

在你的网站,你调用你的脚本很多次,包括一些404

404块:

Failed to load resource: the server responded with a status of 404 (Not Found) http://omarhabash.com/wp/assets/css/bootstrap.min.css 
Failed to load resource: the server responded with a status of 404 (Not Found) http://omarhabash.com/wp/assets/css/style.css 
Failed to load resource: the server responded with a status of 404 (Not Found) http://omarhabash.com/wp/assets/plugins/grid/component.css 
Failed to load resource: the server responded with a status of 404 (Not Found) http://omarhabash.com/wp/assets/js/modernizr.custom.js 
Failed to load resource: the server responded with a status of 404 (Not Found) http://omarhabash.com/img/star.png1 
Consider using 'dppx' units, as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) 
在你的脑袋

那么你有你有一个像Modernizr的脚本调用两次

然后在您的<footer>中,您具有与<head>中调用的相同的脚本。只是清理您的网站,它应该工作正常