我有數據,當我點擊Show More
它顯示數據和Show More
消失。數據和一個新按鈕出現。當我點擊時,數據再次消失。一旦被點擊,我怎樣才能讓Show More
出現?如何使用Jquery使按鈕消失然後reapear?
我的HTML代碼爲:
<button id="show">Show More</button>
<div id="complete">
<img src="Pictures/xerox.png" height="20%" width="20%">
</div>
<p>
<button id="hide">Show Less</button>
我jQuery代碼是:
$(document).ready(function(){
$("#show").click(function(){
$(this).parent().addClass("more");
$(this).hide();
$("#complete").show();
});
$("#hide").click(function(){
$("#complete").hide();
});
});
什麼是感謝你,沒有工作。 :) –