Ticket #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: | Jorn.Zaefferer@… |
| Blocking: | Blocked by: |
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.
Change History
comment:2 Changed 4 years ago by dmethvin
- Status changed from new to closed
- Resolution set to invalid
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 .
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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