I'm trying to use the show/hide/toggle functionality to switch on and off text areas in my page.
I tried usine the hide function from ready to default sections of my page to hidden, like this.
- $(document).ready(function(){
- $('#mytextarea1').hide();
- });
This piece worked fine. Then I tried to bring it back on to the screen using toggle.
- $('#mybutton1').click(function(){
- $('#mytextarea1').toggle();
- });
This doesn't do anything. I also tried wrapping it in $(window).load(function(){...
but this also did not work for me.
This is my first time using jQuery, so I'm sure I'm just missing something simple, but right now I'm stumped.