JsTree error in IE8

I was working with jsTree and faced the problem in IE8. All data is displayed correctly in the tree, but when I try to collapse the tree branch it does not display correctly. That is, an animation of a smooth collapse occurs, but then the data is visible again when it should not be.

The same code works fine on Firefox 3.6.27 and Chrome 18.0.1025.151. Any idea why IE8 would behave differently?

Here is the code for the web page:

<html>
<head>
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="jstree/jquery.jstree.js"></script>
</head>
<body style="margin:0px">
    <script type="text/javascript">
        $(function() {
            $("#equipment_tree")
                .jstree({ "plugins" : ["themes","html_data","ui"] });
        });
    </script>
    <div id="equipment_tree" style="width:185px; float:left; height:100%; overflow:auto;">
        <ul>
            <li class="jstree-open"><a href="#">Root node 1</a>
                <ul>
                    <li><a href="#">Child node 1</a></li>
                    <li><a href="#">Child node 2</a></li>
                    <li><a href="#">Child node 3</a></li>
                    <li><a href="#">Child node 4</a></li>
                </ul></li>
            <li><a href="#">Root node 2</a></li>
        </ul>
    </div>
</body>
</html>

      

And also a picture of erroneous behavior: The erroneous behavior in IE8 for jsTree

+3


source to share


2 answers


You are missing an ad !DOCTYPE

. Add at the top of the page at the top of the page and that should fix the problem ...

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

      



Read here about! DOCTYPE for IE.

+5


source


It's fine.



<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

      

0


source







All Articles