1. 程式人生 > >jQuery外掛treeview點選節點名稱不展開、收縮節點

jQuery外掛treeview點選節點名稱不展開、收縮節點

修改jquery.treeview.js檔案中的applyClasses方法(註釋掉兩行程式碼):

修改後的applyClasses方法如下:

applyClasses: function(settings, toggler) {
/*
this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event) {
toggler.apply($(this).next());
}).add( $("a", this) ).hoverClass();
*/


if (!settings.prerendered) {
// handle closed ones first
this.filter(":has(>ul:hidden)")
.addClass(CLASSES.expandable)
.replaceClass(CLASSES.last, CLASSES.lastExpandable);

// handle ope