Hi there,

I have a (few) jQuery UI's accordions on a single page, ever accordion
exists of two elements; one visible, one hidden.
Initially the invisible one has no content, but it's loaded with
jQuery. My code looks like this:

[code]

        $('.project').each(function(){
                var cur_project_id = $(this).attr( "id" );
                $( "#"+cur_project_id+" .summary" ).after( "<a class=\"head\"></
a><div class=\"bodytext\"></div>" );
                $( "#"+cur_project_id+" .bodytext" ).load( cur_project_id+".html
div.bodytext" );
        });

[code]

As you can see, first i dynamically create the container for the
secondary content, and then i fill it up (out of sight). Works like a
charm, but only when i try to add the following nothing happens:

[code]

        $( "#"+cur_project_id+" .bodytext p" ).append( '<a href="#"
class="less">Click this link</a>' );

[/code]

But if i append it to, say $( "#"+cur_project_id+" .head" ) all are
influenced, the 'real' one, and the dynamically created one.

Any clues how to solve this?

Thanks.

Reply via email to