2013-07-19 3 views
-1

플러그인을 사용하려고 시도했지만 효과가 없습니다. 코드가 표시되며 장소가 괜찮습니다. 도와주세요, 조언 해주세요.내 부트 스트랩이 작동하지 않는 이유

<!DOCTYPE HTML> 
    <html lang="en"> 
    <head> 
     <meta charset="UTF-8"> 
     <title></title> 
     <link media="all" rel="stylesheet" href="docs/assets/css/bootstrap.css" type="text/css" /> 
     <link media="all" rel="stylesheet" href="docs/assets/css/bootstrap-responsive.css" type="text/css" /> 
     <script src="sgsheg/jquery-1.10.0.min.js" type="text/javascript"></script> 
     <script src="sgsheg/bootstrap.min.js" type="text/javascript"></script> 
     <script src="js/bootstrap-modal.js" type="text/javascript"></script> 
    </head> 
    <body> 
     <div class="modal hide fade"> 
     <div class="modal-header"> 
      <button type="button" class="close" data-dismiss="model" aria-hidden="true" >&times;</button> 
      <h3>Modal header</h3> 
     </div> 
     <div class="modal-body"> 
      <p>One fine body...</p> 
     </div> 
     <div class="modal-footer"> 
      <a href="#" class="btn">Close</a> 
      <a href="#" class="btn btn-primary">Save changes</a> 
     </div> 
    </div> 
    </body> 
    </html> 

enter image description here

+2

실제로 무엇이 잘못 되었나요? 귀하의 예를 잘 보인다. "Close"와 "Save changes"버튼에'data-dismiss = "modal"'을 넣는 것을 잊었습니까? "x"닫기 버튼 – Ian

+7

에서 "data-dismiss ="model "철자가 잘못되었다는 것을 유의하십시오. 너 거북이가 보이니? – j08691

+1

@ j08691 : [logo] (http://stackoverflow.com/tags/logo) 질문으로 다시 태그 하시겠습니까? –

답변

1

당신은 toggle R

<!-- Button to trigger modal --> 
<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a> 

누락 또는 당신은 그것을 해고 할 수 수동으로

그것은 당신이해야 할 무엇에 따라 달라집니다
$(function(){ 
    $(".modal").modal("show"); //shows the modal on document ready 
    //$(".some-class").on('click' , function() { //this is if you want to fire it with a button 
    // $(".modal").modal("show");    //of course you don't have to use both data-* 
    //}           //and javascript, choose one. 
} 

;

html 대신 사용하지 않는 경우는 doc가 준비되면, modalshowjavascript를 사용하는 경우.

UPDATEbootstrap.js 또는 bootstrap-modal하지을 togheter 있습니다.

0

그것은 당신이 정말 부트 스트랩 모달을 포함하지 않아도 백리향 잎 엔진은 그래서 또한

th:src="@{sgsheg/jquery-1.10.0.min.js}" 
th:src="@{sgsheg/bootstrap.min.js}" 

시도 정의

th:src="@{...}" 

로 지정 스크립트 SRC 필요하다고 밝혀 .js가 이미 있기 때문에 bootstrap.min.js

그리고 resourceHandler as "/sgsheg/**" and "/js/**"을 정의한 경우 src url 앞에 슬래시 (/)를 넣어야합니다.

관련 문제