jquery - toggle show/hide div with button? load state hidden -
i using jquery toggle hide/show div with:
html:
<div id="newpost"> test text </div> <button>click</button>
jquery:
$("button").click(function() { $("#newpost").toggle(); });
(the above working perfectly)
from: http://jsfiddle.net/andrewwhitaker/kpfrb/
how can change state on page load hidden?
use style="display:none"
or hidden="true"
Comments
Post a Comment