jstree 点箭头有效但点后面item无效的bug
2011-10-26 22:37
155 查看
比如现在有html(django template)如下:
为了修复这个bug,只要给template_category_item添加一个事件响应即可,代码如下:
<li class="jstree-closed"> <ins class="jstree-icon"> </ins> <a href="#" name="template_category_item" value="{{key}}"><ins class="jstree-icon"> </ins>{{key}}</a> <ul> {% for template in value %} <li class="jstree-last jstree-leaf"> <ins class="jstree-icon"> </ins> <a href="#" name="template_list_item" value="{{template.pk}}"><ins class="jstree-icon"> </ins>{{template.module}}</a> </li> {% endfor %} </ul> </li>
为了修复这个bug,只要给template_category_item添加一个事件响应即可,代码如下:
$("a[name=template_category_item]").live("click", function(e){ var evt = document.createEvent("MouseEvents"); evt.initEvent("click", true, true); $(this).prev()[0].dispatchEvent(evt); return false; });
相关文章推荐
- 台式电脑前面音频插孔无效,主机后面有效?为什么必须禁用前置面板插孔检测前置麦克才可以有声
- Android中ExpandableListView中含有Checkbox,Group长按事件无效,ChildItem长按事件有效
- Activity 右进右出动画;(解决右进有效,右出无效BUG)
- RecyclerView Item 行高定义无效的BUG
- checkbox全选/全不选只有第一次点击的时候有效,后面点击全部无效了
- jquery checkbox checked无效(第一次有效,后面就没反应了)
- 让png在ie下正常显示 用到了jquery插件DD_belatedPNG 但是在ie6中这句话 前面添加有效 后面移除无效 IE6 jq removeClass无效
- ListView item点击事件问题:第一次点击有效,再次点击item无效。场景是在item的展开效果
- checkbox全选/全不选只有第一次点击的时候有效,后面点击全部无效了
- 大家有没有发现ListCtrl的LVN_ITEMCHANGED时间为什么连续响应3次,是不是vc的bug,急!!!
- 让元素有效和无效
- flash bug 点击链接无效
- Web_PHP_DedeCMS_channelartlist里,autoindex无效,用itemindex替代
- Flex中如何通过enabled属性在RadioButtonGroup中将所有的RadioButton设置为有效或无效状态的例子
- 大家有没有发现ListCtrl的LVN_ITEMCHANGED时间为什么连续响应3次,是不是vc的bug,急!!!
- Android中设置ListView的item高度无效--解决方案
- 如何有效地解Bug (RED方法)
- Recyclerview隐藏单个item代码(经测试有效)!
- QTCreator3.0.0的BUG。。。竟然写铁 鞋两个字。。后面标点符号会显示不见(其实在)。。。
- 成功解决RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position