http://seedgo0504.esy.es/< - 这是我的网站网址
当我点击'*로그인'按钮时,它会加入'*가입하기'按钮。
当我点击按钮时,我可以让按钮不动吗?
*('로그인'表示登录) *('가입하기'意味着成为会员)
的index.php
<div class = 'collapse navbar-collapse bs-navbar-collapse'>
<ul class ="nav navbar-nav"> ... </ul>
<ul class="nav navbar-nav navbar-right" >
<button type="button" class="btn btn-success navbar-btn" id="login"
data-toggle="popover" data-placement="bottom">로그인</button>
<button type="button" class="btn btn-success navbar-btn ">가입하기</button>
</ul>
</div>
main.js
$("#login").popover({
html : false,
content: "가입하기"
});
答案 0 :(得分:1)
为避免跳转button
,请为工具提示指定正确的container
:
$("#login").popover({
html : false,
content: "가입하기",
container: 'body'
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"/>
<ul class="nav navbar-nav" >
<button type="button" class="btn btn-success navbar-btn" id="login" data-toggle="popover" data-placement="bottom">로그인</button>
<button type="button" class="btn btn-success navbar-btn ">가입하기</button>
</ul>