2 problems with async tree (href and expand)
Hi,
i'm new in jquery and my english is not the best :o(
Ich hope you understand what i mean.
I used jquery and treeview to make a sample file to test this.
When i click on a node, it should open a new url, so i append the href parameter, but when i click on a node it opens the subfolder, but not the new url.
My second problem is, that when i add the expand parameter jquery opens the node, but only shows "placeholder", when i close the node and open it manualy, everything looks fine.
To you have an idea wheres the problem?
Sorry for my bad english :o(
The Frame
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script src="../jquery.treeview.js" type="text/javascript"></script>
<script src="../jquery.treeview.async.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#black").treeview({
persist: "location",
collapsed: true,
unique: true,
url: "source.cfm"
<!--- <cfoutput>url: "/cfc/tree.cfc?lng=de&method=getLinkCategoriesForExtTree&oldpath=#url.oldpath#"</cfoutput>--->
})
});
</script>
</head>
<body>
<h1 id="banner"><a href="http://bassistance.de/jquery-plugins/jquery-plugin-treeview/">jQuery Treeview Plugin</a> Demo</h1>
<div id="main">
<ul>
<li><a href=".">Main Demo</a></li>
<li><a href="source.phps">Server component used</a></li>
</ul>
<div id="treecontrol">
<a title="Collapse the entire tree below" href="#"><img src="../images/minus.gif" /> Collapse All</a>
<a title="Expand the entire tree below" href="#"><img src="../images/plus.gif" /> Expand All</a>
<a title="Toggle the tree below, opening closed branches, closing open branches" href="#">Toggle All</a>
</div>
<h4>Lazy-loading treed</h4>
<ul id="black">
</ul>
</div>
A sample for source.cfm
[{"hasChildren":true,"text":"asdfasdfasd 54","id":54,"expanded":true,"href":"http:\/\/www.xy.de"}]
Thanks a lot.
Carsten