| Issue 151: | dynatree does not work when loading content using jquery .load | |
| 1 person starred this issue and may be notified of changes. | Back to list |
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
Nov 20, 2010
(No comment was entered for this change.)
Status:
Done
Jul 17, 2012
considered verified
Jul 17, 2012
(No comment was entered for this change.)
Status:
Verified
Jan 26, 2013
(No comment was entered for this change.)
Labels:
Milestone-Release0.0
|
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...