Bug Tracker

Opened 15 years ago

Closed 13 years ago

#2394 closed enhancement (invalid)

[treeview] more flexible animation options

Reported by: gt2304b Owned by:
Priority: minor Milestone: 1.2.4
Component: plugin Version: 1.2.3
Keywords: treeview Cc: [email protected]
Blocked by: Blocking:


In order to give the user the ability to customize animation options, I made the following changes to your code in heightToggle() and heightHide()...

heightToggle: function(animated, callback) {
			animated ?
                animated = $.extend({complete: callback},animated});
				this.animate({ height: "toggle" }, animated) :
heightHide: function(animated, callback) {
			if (animated) {
                animated = $.extend({complete: callback},animated});
				this.animate({ height: "hide" }, animated);

this then allows the user to customize animation on treeview initialization:

 $jq('ul.tree').treeview( {
                    animated: {duration:500, easing:"swing"},

could you possibly add this (or similar functionality) to your next revision? I think users would find this useful...

Thanks for the great plugin!

-John L.

Change History (2)

comment:1 Changed 15 years ago by gt2304b

uh.. should have dbl checked before posting -- two errors in what I posted above:

heightToggle should look like this:

heightToggle: function(animated, callback) {
			animated ?
				this.animate({ height: "toggle" }, $.extend({complete: callback},animated)) :

and also excuse the typo in heightHide, the closing "}" after animated should not be there...

comment:2 Changed 13 years ago by dmethvin

Resolution: invalid
Status: newclosed

This is not a jQuery core bug. Please report plugin bugs to the plugin's author, or ask on the jQuery forums. jQuery UI bugs should be reported on the UI bug tracker, http://dev.jqueryui.com .

Note: See TracTickets for help on using tickets.