当前位置: 动力学知识库 > 问答 > 编程问答 >

jquery - Button gets non-clickable when code for modal window is added

问题描述:

I have this button to launch a modal window

<a href="#" class="btn btn-success btn-wide" data-target="#myModal" data-toggle="modal" >Launch Modal </a>

When I add the following markup for modal window (copied from bootstrap's site itself), I can't click on the button. When it's removed, the button becomes clickable again.

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

<div class="modal-dialog">

<div class="modal-content">

<div class="modal-header">

<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>

<h4 class="modal-title" id="myModalLabel">Modal title</h4>

</div>

<div class="modal-body">

...

</div>

<div class="modal-footer">

<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>

<button type="button" class="btn btn-primary">Save changes</button>

</div>

</div>

</div>

</div>

分享给朋友:
您可能感兴趣的文章:
随机阅读: