Issue 151: dynatree does not work when loading content using jquery .load
Status:  Verified
Owner: ----
Closed:  Nov 2010
Reported by tonyru...@bellsouth.net, Sep 7, 2010
When the tree contents are rendered in from main index.htm page everything works as expected.

When the tree contents are rendered using jquery .load from the homt.htm page dynatree does not work.

Attached are two files:
1.) index.htm - the main html containing the tree contents and javascript to load the same tree from home.htm file
2.) home.htm - contains tree content loaded using jquery .load function.

Expecting the trees loaded from index.htm and from home.htm to be rendered exactly the same.

Using jquery 1.3.2, jquery ui 1.7.1, dynatree 0.5.4

Windows XP Professional with IE 7, Safari 5.0.1, and Firefox 3.0.19
Windows Server 2003 R2 with IE 7 
Windows Server 2008 Enterprise with IE 8


index.htm
1.9 KB   View   Download
home.htm
1013 bytes   View   Download
Sep 29, 2010
Project Member #1 moo...@wwwendt.de
You have to initialize the tree *after* the content was loaded:

{{{
        $('#page_content').load(url + ' #page_content', function(){

            $('#progress').remove();

		$("#tree2").dynatree({

        ...
            }

        });
}}}

Also, there should be no duplicate ids in your file (id='tree' is duplicate)
and the outer tag of the home.html file can be omitted.

Anyway, I would always prefer, to use the built-in initAjax option and provide the content in JSON format...
Status: Waiting
Nov 20, 2010
Project Member #2 moo...@wwwendt.de
(No comment was entered for this change.)
Status: Done
Jul 17, 2012
Project Member #3 moo...@wwwendt.de
considered verified
Jul 17, 2012
Project Member #4 moo...@wwwendt.de
(No comment was entered for this change.)
Status: Verified
Jan 26, 2013
Project Member #5 moo...@wwwendt.de
(No comment was entered for this change.)
Labels: Milestone-Release0.0