我在 twitter bootstrap popover 部分有按钮,它的 id 名称是“newbutton”
当我打电话时$('#newbutton').on('click',function(){ alert(123); });
什么都不会发生,但是当我将它移到弹出框之外时它工作正常
这是我的代码
<img data-placement='bottom' data-content='' title='<button class="close" aria-hidden="true" data-dismiss="modal">×</button> <h5>Login</h5>' class="assesment_islogin" src="<?php echo base_url() ?>resources/images/mtc_slize_13.jpg" width="103" height="39" />
<div class="pop_login_body">
<div class="alert fade in alert-error"> <button data-dismiss="alert" class="close" type="button">×</button>not logged in yet </div>
<input type="text" id="inputEmail" placeholder="Email">
<input type="password" id="inputPassword" placeholder="Password">
<div class="control-group">
<div class="controls">
<!--<label class="checkbox">
<input type="checkbox"> Remember me
</label>-->
<button type="submit" id="newbutton">Sign in</button>
</div>
<a href="#" class=""> Forget your password</a>
</div>
</div>