2013-03-07 57 views
0

當您單擊登錄或註冊按鈕模式打開.... 模式從頂部在Chrome瀏覽器下滑.... 在哪裏在ie9瀏覽器它只是打開了.... 如何修復IE 9瀏覽器的滑動問題...模態不滑動從頂部在ie9

這裏提供以下

http://jsfiddle.net/KNPZB/10/embedded/result/

<script type="text/javascript"> 
     $('#myModal').modal({ show: false }) 
    </script> 
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> 


<div id="myModal" class="modal hide fade" style="width: 427px; height: 226px;"> 
     <div class="modal-header"> 
     <button type="button" class="close" data-dismiss="modal" aria-hidden="true" >&times;</button> 
     </div> 
     <div class="modal-body" style="width: 336px;"> 

     <form method="post" class="navbar-form pull-right" action="http://intra.defie.co/Account/"> 
       <input class="span2" type="text" name="email" placeholder="Email" style="width: 263px; margin-top: 19px; margin-bottom: 10px;"><br> 
       <input class="span2" type="password" name="password" placeholder="Password" style="width: 263px;"><br> 
       <button type="submit" class="btn" style="margin-top: 13px; margin-left: 100px;">Sign in</button> 
      </form> 



     </div> 

    </div> 

回答

0

我的代碼至少有一對夫婦的問題在JavaScript你有我的文件ncluded。

  1. <head>節,你包括bootstrap.js你甚至已加載jQuery的之前。因爲它看起來像你不加載jquery直到頁面的底部。 bootstrap.js需要後 jquery。

  2. 已嘗試在頁面的頂部有無效的路徑加載bootstrap.js,然後在頁面底部加載所有的JavaScript文件將反正列入bootstrap.js引導。你只需要一個方法:使用boostrap.js(在jquery之後放置),或者只加載你需要的引導插件(再次,在jquery之後放置)。在引導站點上查看源代碼,看看它們是如何實現的。 twitter.github.com/bootstrap/

  3. 無論是在頭部和底部附近,您呼叫的jQuery函數jQuery的本身加載之前,所以如果你用F12打開你的瀏覽器控制檯,您會在Chrome中看到Uncaught ReferenceError: $ is not defined,和IE9中的​​。

  4. 除了所有的javascript源文件問題,bootstrap.css文件也有一個無效的路徑,不加載。

我懷疑,一旦您解決了這些問題,您的網頁可能會以預期的行爲運行;當然這將是一個開始的好地方。