在我的应用程序中,我创建了以下 jsTree
$('#categoryTree').jstree({
plugins: ['themes', 'html_data', 'contextmenu', 'ui', 'types'],
contextmenu: {
items: ContextMenuItems
},
ui: {
select_limit: 0
},
themes: {
theme: 'classic'
},
types: {
type_attr: 'nodetype',
types: {
category: {
icon: { image: baseUrl + '/Images/folder.png' }
},
testcase: {
icon: { image: baseUrl + '/Images/hlp.png' }
}
}
}
});
一切在 FF 和 Chrome 上运行良好,类别节点使用指定的 folder.png
,测试用例节点使用 hlp.png
作为它们的图标。
但是,Internet Explorer 似乎并不尊重这一点,它对所有节点使用默认图标。任何人都知道如何强制 IE 使用正确的类型图标,而不是使用默认图标?
最佳答案
尝试将其放在页面顶部以禁用怪癖模式:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
引用: http://groups.google.com/group/jstree/browse_thread/thread/e049c1a6eb24b44a
关于javascript - JsTree 的节点未使用在 IE 中的类型插件中指定的图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4852784/