How to make one button for open and close div, in this jquery code?

Posted by metal-gear-solid on Stack Overflow See other posts from Stack Overflow or by metal-gear-solid
Published on 2010-06-15T09:34:24Z Indexed on 2010/06/15 9:42 UTC
Read the original article Hit count: 154

Filed under:
|
|
 $(document).ready(function(){

      $('#content1').hide();

            $('a#open').click(function(){

            $('#content1').show('slow');

   });

   $('a#close').click(function(){
        $('#content1').hide('slow');
        })

      });

in this code of toogle open and close button is different

<a> and <a id="close">

I want to make same button <a> for open and close and want to give different background image for open and close position

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about css