0

I am trying to create flow-charts using jsPlumb. I am using it on xhtml file and considering to use it with a backing bean later on. I was messing with preview of drag and drop demo on their website and mutated it a little according to my need. It basically removes End Points(EP) from a chart and makes them non-draggable. My code is working on html file, however, whenever I use it with xhtml charts disappear on setting their draggable on false. It doesn't do that if I use true. Anyway, my question is why it's behaving in such way and how can I solve it?

Here's some parts of my code:

function preview() {

    var windows = $(".shape");
    var x;
    for ( var i = 0; i < windows.length; i++) {
        x = windows[i].getElementsByClassName("ep");
        windows[i].removeChild(x[0]);
        jsPlumb.setDraggable(windows[i], false); // makes charts disappear
    }

    jsPlumb.repaintEverything();
}

Again, exact code works on html file. xhtml file can be found here and javascript file can be found here

4

1 回答 1

0

请参考以下链接。 http://jsplumbtoolkit.com/doc/home

部分:应用程序/xhtml+xml

如果您正在为 application/xhtml+xml 提供服务,那么您需要在 html 元素中包含 VML 命名空间:

http://www.w3.org/1999/xhtml' xmlns:v="urn:schemas-microsoft-com:vml">

不要忘记,在 IE<9 中,不支持 XHTML。

于 2013-10-04T02:12:18.147 回答