When I click the button, the HTML changes, But when I click again, the slide switch switches, but I want to return the html as Show Me.
<div id="show">Show Me</div> <div id="visible">Hello, My name is John.</div> $(document).ready(function(){ $("#show").click(function(){ $('#visible').slideToggle(); $('#show').html('Hide me'); }); })
http://jsfiddle.net/u2p48/13/
Any idea how to do this?
thanks
source share