Hi there,

I am trying to finalise a project so that I can have some categories
in the sidebar collapsed, but not others.

The code so far creates a state where everything in the menu is
collapsed.  My scripting is poor at best, and try as I might, I can't
seem to figure out what to tweak. Can someone give me some pointers as
to what I need to change?

Code:
===
          if (category != currentCategory) {
            if (id > 0) {
              side_bar_html += '</ul></div></div>';
            }
            side_bar_html += '<div class="collapsable">';
            side_bar_html += '<h4 class="toggleCollapsableContent">' +
category + '</h4>';
            side_bar_html += '<div class="collapsableContent"><ul>';
          }
          side_bar_html += '<li><a href="javascript:myclick(' + id +
')">' + menu + '<\/a></li>';
          currentCategory = category;
        }
        side_bar_html += '</ul></div></div>';
        document.getElementById("right").innerHTML = side_bar_html;

        $("h4.toggleCollapsableContent").click(function () {
          if ($(this).next($(".collapsableContent")).is(":hidden")) {
            $(this).next($(".collapsableContent")).slideDown("fast");
            $(this).removeClass("closed");
          } else {
            $(this).next($(".collapsableContent")).slideUp("fast");
            $(this).addClass("closed");
===

Webpage: http://www.ucl.ac.uk/admission/virtual-tours/index2.shtml

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to