Hi,

I'm using the accordion plugin that came with the first release of
jQuery UI and I'm having some troubles getting the right height of the
second content of the accordion.
The code is as follow:

  $(function(){
        $("#side-content").accordion();
  });
  $(function(){
        function get_tags(category) {
        $("div#tags").load('/monitored/tag_cloud/'+category, function () {
                $("div#side-content div#tags p").click( function () {
                        $("fieldset#main-criteria
input#search_text").val(jQuery(this).text());
                });
        });
        }
        // After clicking on a category fill in the select box, retrieve
new tags, insert them
        // in the second content and activate it
        $("div#side-content div#categories p").click( function () {
                cat = jQuery(this).text();
                $("select#category").val(cat);
                get_tags(cat);
                $("div#side-content").activate(1);
        });
  });

I'm creating an accordion for two content parts (identified by divs).
The first content part is filled with some categories (enclosed in <p>
tags). Once I click on one such category I'd like to use it to fill in
a select box, pass it to the get_tags function to retrieve some
related tags, insert them in the second content part of the accordion
and finally activate this second part. Everything goes well except
that the tags are not shown in the second content part because the
style is set automatically set to: height: 0px and overflow-y: hidden
(that is everything over 0px is hidden).
This doesn't happen if I don't activate programmatically the second
content (via $("div#side-content").activate(1)) and instead I do it
manually by clicking on it.
Any suggestion on how to solve this problem? I tried for example
setting {autoheight: true} but in this case the height is limited by
the number of element appearing in the first content (so only a small
part of the second content is shown once loaded because the content of
the second part is larger).

Any help would be very appreciated

Thanks and regards

Reply via email to