我有数据,当我点击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();
});
});
什么是感谢你,没有工作。 :) –