jsTree / jQuery tree stuck "Loading ..." on Chrome
I've been setting up a site using jsTree to style some pre-defined HTML lists. I'm probably doing something stupid, but I can't for the life of me get it working on Chrome (v9.0) - it seems to work fine on Firefox, but Chrome just ge开发者_如何学Cts stuck at a "Loading ..." screen.
I'm using jQuery 1.4.3 and jsTree 1.0rc2 (also tried jQuery 1.5, but doesn't help).
My cut down test case is essentially just one of the examples of the jsTree site - but it seems to work in Chrome when I view the demos on www.jstree.com:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test Page</title>
<link rel="stylesheet" type="text/css" href="/media/css/site.css" />
<script type="text/javascript" src="/media/js/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="/media/js/jquery.jstree.js"></script>
</head>
<body>
<div id="demo">
<ul>
<li><a href="#">Root node 1</a></li>
<li><a href="#">Root node 2</a></li>
</ul>
</div>
<script type="text/javascript"><![CDATA[
$(function () {
$("#demo").jstree({ "plugins" : [ "themes", "html_data" ] });
});
]]>
</script>
</body>
</html>
Any help welcome - I'm stumped ...
Thanks, Iso
Ah - it's a known bug in jstree 1rc2 when the MIME type is application/xhtml+xml.
Patch and comments can be found here:
http://code.google.com/p/jstree/issues/detail?id=776
精彩评论