Bug Tracker

Opened 15 years ago

Closed 15 years ago

#3801 closed bug (invalid)

[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"


Change History (1)

comment:1 Changed 15 years ago by brandon

Resolution: invalid
Status: newclosed

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

Note: See TracTickets for help on using tickets.