![](/img/trans.png)
[英]How to allow popup to keep on popping up even when you moved on to another page & only stops when a button is clicked?
[英]Popup up when button is clicked
我有一個帶有類join-button的加入按鈕當我單擊該按鈕時,我希望收到一個選項,可以加入為成員type A
或成員type B
,然后鏈接到正確的頁面。 我可以幫忙解決此功能嗎? 我應該使用ajax嗎?
<?php if ( !is_user_logged_in() ): ?>
<a href="www.domain.com" class="join-button">Join</a>
<?php endif; ?>
CSS:
.join-button {
-moz-box-shadow:inset 0px 1px 0px 0px #f5840c;
-webkit-box-shadow:inset 0px 1px 0px 0px #f5840c;
box-shadow:inset 0px 1px 0px 0px #f5840c;
background-color:#f5840c;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
border:1px solid #f5840c;
display:inline-block;
color:#ffffff;
font-family:Arial;
font-size:14px;
font-weight:bold;
padding: 1px 4px;
text-decoration:none;
text-shadow:1px 1px 0px #f5840c;
}
只需使用可以從此處下載的jquery UI插件
<script>
$(function() {
$( "#dialog" ).dialog();
});
</script>
<body>
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
</body>
有關更好的文檔和演示,請訪問此鏈接並在演示中搜索對話框
用戶Jquery UI插件在這里是小提琴
$("button.joinbutton").on("click", function () {
$( "#dialog" ).dialog();
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.