這是我的代碼後迅速消失..jQuery的切換按鈕,點擊
<div id="hint-toggle" class="ui-body ui-body-e" style="display: none">
<p>No Hints available right now,check it later</p>
</div>
<button id="show-hint" onclick="showHint();"type="submit" data-inline="true" data-theme="c">Show Hint</button>
<script type="text/javascript">
function showHint(event){
$("#hint-toggle").toggle();
}
</script>
點擊show hint
按鈕,它出現,但2秒內它會消失..我錯過在我的代碼後,任何東西?請幫助我。我想要顯示hint-toggle
直到我再次按show hint
按鈕。
FYI:http://jsfiddle.net/shreeramns/rUKbh/
對我來說似乎很好http://jsfiddle.net/arunpjohny/NFena/1/ –
看起來對我也很好 - > http://jsfiddle.net/JxbGJ/ – adeneo
確保你沒有按兩下按鈕...代碼看起來不錯.. ** ..檢查你的鼠標** .. :) :) – bipen