I believe this is a bug but am not sure.
When using jtree I get elem.nodename is undefined as an error. This only happens in IE.
All my variables are named fine. I have changed them around 700 times just in case that was the problem. This is either a problem with jQuery or jtree. All you need to do to reproduce the error is create a tree in jtree and call the close_node function in ie.
The exact error is
Microsoft JScript runtime error: Unable to get value of the property 'toLowerCase': object is null or undefined
line 4569 in jquery
TAG: function( elem, match ) {
return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
},
my code is here if you are interested. my code is not the problem (unless there is a work around)
---------------------
<html>
<head>
<title>BASIC TREE</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.jstree.js"></script>
<style type="text/css">
</style>
<script type="text/javascript">
$(document).ready(function () {
var tree1 = $("#myTree1");
tree1.jstree({
core: { "animation": 2000,
"initially_open": []
}
});
var tasksNode = $("#liReports");
$.jstree._reference(tree1).close_node([tasksNode_, false]);
});
</script>
</head>
<body>
<div id="myTree1" style="position:absolute;top:100px;left:100px;">
<ul> <!-- UL needed to house children -->
<li id="liTasks">
<a href="#">Tasks</a>
<ul>
<li id="liScheduler">
<a href="">Run Scheduler</a>
</li>
<li id="liBackup">
<a href="">Backup System</a>
</li>
</ul>
</li>
<li id="liReports">
<a href="#">Reports</a>
<ul>
<li id="liEarningsReport">
<a href="#">Earnings Report</a>
</li>
<li id="liExpenseReport">
<a href="#">Expense Report</a>
</li>
</ul>
</li>
</ul>
</div>
</body>
</html>