Hide the "view exposed filter" form or reload the page after submit the form? I am using view exposed filter on a view display as "block". The block is added to dashboard.

I added a second function to "Apply" button using hook_form_alter. I want to hide the expose form of view after submit it. I added the jquery to hide the element using drupal_add_js. But it didn't work.

Is there any way to hide the form or reload the page after submit of expose form so i can hide the form on page load?
Try this:

function custom_form_views_exposed_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form['#id'] == 'views-exposed-form-YOURVIEWNAME') {
    if($_GET['xxx'] == 0){
      hide($form);
    }   
  }
}