Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@

1.4.2 mod
---
* Jquery 3.x fixes: [shorthand-deprecated-v3] JQMIGRATE: jQuery.fn.click() event shorthand is deprecated and [pre-on-methods] JQMIGRATE: jQuery.fn.unbind() is deprecated

1.4.2
---
TODO


1.4.1
-----
* Fix for #2360
Expand Down
16 changes: 8 additions & 8 deletions jquery.treeview.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
},
hoverClass: function(className) {
className = className || "hover";
return this.hover(function() {
$(this).addClass(className);
}, function() {
$(this).removeClass(className);
});
return this.on("mouseenter", function () {
$(this).addClass(className);
}).on("mouseleave", function () {
$(this).removeClass(className);
});
},
heightToggle: function(animated, callback) {
animated ?
Expand Down Expand Up @@ -59,7 +59,7 @@
},
applyClasses: function(settings, toggler) {
// TODO use event delegation
this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) {
this.filter(":has(>ul):not(:has(>a))").find(">span").off("click.treeview").on("click.treeview", function(event) {
// don't handle click events on children, eg. checkboxes
if ( this == event.target )
toggler.apply($(this).next());
Expand All @@ -86,11 +86,11 @@
classes += this + "-hitarea ";
});
$(this).addClass( classes );
})
});
}

// apply event to hitarea
this.find("div." + CLASSES.hitarea).click( toggler );
this.find("div." + CLASSES.hitarea).on("click", toggler );
},
treeview: function(settings) {

Expand Down