2013-04-28 12 views
3

트위터 부트 스트랩 모달에 문제가 있습니다. 닫기 버튼을 클릭해도 닫히지 않습니다.트위터 부트 스트랩 모달이 클릭시 닫히지 않음

처음부터 사용할 수있는 모달을 만들었습니다. 즉, 모달을 보여주는 페이지로드에서 만들었습니다. 내 모든 자바 스크립트를 사용하지 않았다.

여기에 내가 같은 페이지에 두 개의 모달을 언급한다 코드를

<div id="myModal2" class="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2" aria-hidden="true"> 
<div class="modal-header"> 
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> 
    <h3 id="myModalLabel2">Instructions</h3> 
</div> 
<div class="modal-body"> 
    <ol><li>Please press either left or right arrow button to start the carousel.</li><li>For continuous movement either put the cursor on this dialog or outside the viewport</li></ol> 

</div> 
<div class="modal-footer"><button class="btn" data-toggle="modal" data-target="#myModal">View Source</button> 
    <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close</button> 
</div> 

한 가지입니다.

그리고 라이브 페이지를보고 싶은 경우에, 여기에 링크 http://nazmulweb.com/bootstrap_carousel_full_page_fade

당신은 아무것도 더 알 필요가있는 경우 알려 주시기 바랍니다이다.

정말 고마워요.

+0

봅니다'클래스 = "모달 페이드"' – anpsmn

+0

@anpsmn 즉 모달합니다. – Hoque

+1

부트 스트랩은 모든 클래스가 숨기기에 모달 페이드가 될 것으로 예상합니다. 모든 클래스를 제공하고'$ ('myModal'). modal ('show') 스크립트를 통해 모달을 표시 할 수 있습니다. – anpsmn

답변

0

숨기기 및 페이드 클래스를 모달 div에 추가해보세요. 즉

<div id="myModal2" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2" aria-hidden="true"> 
2

나는 동일한 문제가있었습니다. 나는 페이지의 맨 아래에 대화 상자 div (body 태그를 닫기 직전)를 배치하여 해결할 수 있습니다.

0

이 닫기 버튼을 사용할 수 있습니다. 내가 모달 표시되지 않는 페이지를로드하는 동안, 클래스에 "페이드"를 추가하면 페이드 클래스를 추가

<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> 
관련 문제