I would like to hide the div and show another one if the form is submitted successfully, I guess I have to use jquery's `.hide()` and `.show()` classes but I don't know how. Can someone help me out?

css

```
 .hidden{display:none}
 .main{}

```

php

```
  <div class="main>
  <form action="" method="post">
  <!--all the stuff to be hidden goes here-->
  <input type="submit" name="submit">
  </form>
  </div>

  <div class="hidden">
   <div>Form has been successfully submitted</div><!-- will be visible upon successful form submision-->
  </div
  <?php
  if(isset($_post['submit']){
     if(!empty($var_1) || !empty($var_2))
       {
       //insert in to database
       //success
       }
       else{
          //something is wrong.
        }
      }

```