How to do this

How to do this

I have this code here

  1. <script>
  2. $(document).ready(function(){
  3.  $("button").click(function(){
  4. $("select").hide();
  5.  });
  6. });
  7. </script>
So I understand basics of jquery but bigger problem is with how to go beyond basics. So On my page i have <button>button name</button>

when i click it, all elements "select" will hide. How to unhide them?

I tried this, but it does not work.

  1. <script>
  2. $(document).ready(function(){
  3.   $("button").click(function(){
  4.                   if $("select").hide()== true {
  5.                         $("select").show();
  6.                   }
  7.                   else
  8.                   {
  9.                         $("select").hide();
  10.                   };
  11.   });
  12.             
  13. });
  14. </script>