单击按钮我想显示模态窗口。
这是我实施的。
<a class="btn addIdeaBtn" data-toggle="modal" href="#addIdea" >Launch Modal</a> <!-- Model Window ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <div class="modal hide fade in" id="addIdea"> <div class="modal-header"> <button class="close" data-dismiss="modal">×</button> <h3>Add Idea</h3> </div> <div class="modal-body"> <form action="" method="post"> <textarea id="addIdeaPopUp" class="tinymce" name="" cols="" rows=""></textarea> </form> </div> <div class="modal-footer"> <a href="home.html" class="btn">Close</a> <a href="home.html" class="btn btn-primary">Add Idea</a> </div> </div>当我单击按钮时,模态窗口出现然后消失:P
http://mink7.com/projects/cmrc/idea_exchange.html
按钮位于屏幕底部,左侧粘贴为页脚。
On clicking a Button i want to show a Modal Window.
This is what i have implemented.
<a class="btn addIdeaBtn" data-toggle="modal" href="#addIdea" >Launch Modal</a> <!-- Model Window ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <div class="modal hide fade in" id="addIdea"> <div class="modal-header"> <button class="close" data-dismiss="modal">×</button> <h3>Add Idea</h3> </div> <div class="modal-body"> <form action="" method="post"> <textarea id="addIdeaPopUp" class="tinymce" name="" cols="" rows=""></textarea> </form> </div> <div class="modal-footer"> <a href="home.html" class="btn">Close</a> <a href="home.html" class="btn btn-primary">Add Idea</a> </div> </div>When i click the Button the modal window appears and then vanishes :P
http://mink7.com/projects/cmrc/idea_exchange.html
The button is at the bottom of the screen to the left sticking as a footer.
最满意答案
尝试从模态中删除课堂内容。 JS会自动在hide和in之间切换。 由于您的按钮设置为切换模态,因此它会消失,因为它认为它是可见的。
含义: <div class="modal hide fade" id="addIdea">
Try removing the in class from your modal. The JS automatically toggles between hide and in. Since your button is set to toggle the modal, it disappears, because it believes it is visible.
Meaning: <div class="modal hide fade" id="addIdea">
更多推荐
发布评论