<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>btw i had achieved what i wanted using this code (uses jquery). for future reference.
&lt;pre&gt;
      open: function() {
        var allsections = $('#GM_config').contents().find('.section_header_holder');
        //create a toggle all link
        allsections.eq(0).before('&lt;a href=&quot;javascript:;&quot;&gt;Toggle All Sections&lt;/a&gt;');
        allsections.prev('a').click(function(eventObj){
          $(this).nextAll().find('div.config_var').toggle();
          $(this).nextAll().find('.section_header').toggleClass('collapsed');
        });
        // bind section headings to toggle the display of the section
        allsections.prev('a').nextAll()
          .find('.section_header')
          .attr('title','click to expand/collapse section')
          .click(function(eventObj){
          $(this).nextAll('div.config_var').toggle();
          $(this).toggleClass('collapsed');
        });
        //align all labels - not working right now
        allsections.each(function () {
          $(this).find('label').autoWidth();
          //$(this).find('.field_label').autoWidth();
        });
        nHtml.Click(allsections.prev('a')[0]); //click the toggle all button
      },
&lt;/pre&gt;</body>
  <body-html>&lt;p&gt;btw i had achieved what i wanted using this code (uses jquery). for future reference.
&lt;br /&gt;&lt;pre&gt;
      open: function() {
        var allsections = $('#GM_config').contents().find('.section_header_holder');
        //create a toggle all link
        allsections.eq(0).before('&lt;a&gt;Toggle All Sections&lt;/a&gt;');
        allsections.prev('a').click(function(eventObj){
          $(this).nextAll().find('div.config_var').toggle();
          $(this).nextAll().find('.section_header').toggleClass('collapsed');
        });
        // bind section headings to toggle the display of the section
        allsections.prev('a').nextAll()
          .find('.section_header')
          .attr('title','click to expand/collapse section')
          .click(function(eventObj){
          $(this).nextAll('div.config_var').toggle();
          $(this).toggleClass('collapsed');
        });
        //align all labels - not working right now
        allsections.each(function () {
          $(this).find('label').autoWidth();
          //$(this).find('.field_label').autoWidth();
        });
        nHtml.Click(allsections.prev('a')[0]); //click the toggle all button
      },
&lt;/pre&gt;&lt;/p&gt;</body-html>
  <created-at type="datetime">2009-11-09T03:50:29Z</created-at>
  <forumable-id type="integer">49700</forumable-id>
  <forumable-type>Script</forumable-type>
  <id type="integer">188521</id>
  <topic-id type="integer">36436</topic-id>
  <updated-at type="datetime">2009-11-09T03:50:29Z</updated-at>
  <user-agent>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4</user-agent>
  <user-id type="integer">42874</user-id>
</post>
