Skip to main content

Bug Tracker

Side navigation

#3801 closed bug (invalid)

Opened January 07, 2009 04:26AM UTC

Closed January 20, 2009 03:46AM UTC

[treeview] Calling $("#treeMenu").treeview() mutiple times on the same object fix (with diff)

Reported by: drVali Owned by:
Priority: major Milestone: 1.3
Component: ajax Version: 1.2.6
Keywords: treeview, ajax Cc:
Blocked by: Blocking:
Description

Hey

If you call "treeview" more than one on the same object (say in an Ajax context), your tree view messes up. (you can't open the folders any more).

Basically, if you try to make the same object a tree view twice, after it's already been made into a tree view, the function should not do anything.

I added a quick fix, but you guys decide if it's the correct way to fix this (works for me), here is my diff:


Index: jquery.treeview.js

=

--- jquery.treeview.js (revision 187)

+++ jquery.treeview.js (working copy)

@@ -92,6 +92,9 @@

this.find("div." + CLASSES.hitarea).click( toggler );

},

treeview: function(settings) {

+ if (this.hasClass("treeview")) {

+ return false;

+ }

settings = $.extend({

cookieId: "treeview"


Attachments (0)
Change History (1)

Changed January 20, 2009 03:46AM UTC by brandon comment:1

resolution: → invalid
status: newclosed

Please use the plugins site issue tracking for plugin specific issues. http://plugins.jquery.com/project/treeview