How to make filter criteria fieldset in a view to be collapsible by clicking on a link using tpl file overriding default file? I am trying to create a collapsible fieldset of filter criteria on click of a link 
the code I tried is as follows:
    ';
    ?>

&lt;fieldset class="collapsible collapsed"&gt;
&lt;legend class="collapse-processed"&gt;
&lt;a href="#"&gt;Error : Uncaught TypeError: Object [object Object] has no method 'drupalGetSummary' jquery.min.js:16&lt;/a&gt;
&lt;a href="#"&gt;Edit Search Criteria&lt;/a&gt;
&lt;/legend&gt;
&lt;fieldset&gt;


But when I click on the link I dont get the collapsed or collapsible feature 

The error I am getting is as follows:
Error : Uncaught TypeError: Object [object Object] has no method 'drupalGetSummary' jquery.min.js:16

In the resources of the page the collapse.js is present which indicates that the js  file is loaded.

After updating the jquery version from 1.5 to 1.7 the old error disappears and new error is displayed as follows: Uncaught TypeError: Object [object Object] has no method 'drupalGetSummary' collapse.js:70
I got the above working by writing a function in the module as shown in the link

/**
 * Implements hook_preprocess_views_view().
 */
function my_module_preprocess_views_view(&amp;$vars) {
  if ($vars['view']-&gt;name === 'my_view') {
    // Wrap exposed filters in a fieldset.
    if ($vars['exposed']) {
      drupal_add_js('misc/form.js');
      drupal_add_js('misc/collapse.js');
      // Default collapsed
      $collapsed = TRUE;
      $class = array('collapsible', 'collapsed');
      if (count($_GET) &gt; 1){
        // assume other get vars are exposed filters, so expand fieldset
        // to show applied filters
        $collapsed = FALSE;

    $class = array('collapsible');
  }
  $fieldset['element'] = array(
    '#title' =&gt; 'Refine your search',
    '#collapsible' =&gt; TRUE,
    '#collapsed' =&gt; $collapsed,
    '#attributes' =&gt; array('class' =&gt; $class),
    '#children' =&gt; $vars['exposed'],
  );
  $vars['exposed'] = theme('fieldset', $fieldset);
}
  }
}