Skip to main content

Bug Tracker

Side navigation

#2394 closed enhancement (invalid)

Opened February 22, 2008 08:45PM UTC

Closed October 12, 2009 11:52PM UTC

[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: Jorn.Zaefferer@gmail.com
Blocked by: Blocking:
Description

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.

Attachments (0)
Change History (2)

Changed February 22, 2008 08:51PM UTC by gt2304b comment:1

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...

Changed October 12, 2009 11:52PM UTC by dmethvin comment:2

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 .