Release: Treeview plugin 1.4

I’ve just released an update to the treeview plugin.

One major improvement are completely overhauled themes, based on CSS sprites that require only two images. That makes customizing them much easier, while also improving performance – less file, less filesize.

Also new are lazy-loaded trees, based on Ajax and JSON.

From the changelog:

  • Fixed tree control to search only for anchors, allowing images or other elements inside the controls, while keeping the control usable with the keyboard
  • Restructured folder layout: root contains plugin resources, lib contains script dependencies, demo contains demos and related files
  • Added prerendered option: If set to true, assumes all hitarea divs and classes already rendered, speeding up initialization for big trees, but more obtrusive
  • Added jquery.treeview.async.js for ajax-lazy-loading trees, see async.html demo
  • Exposed $.fn.treeview.classes for custom classes if necessary
  • Show treecontrol only when JavaScript is enabled
  • Completely reworked themeing via CSS sprites, resulting in only two files per theme
    • updated dotted, black, gray and red theme
    • added famfamfam theme (no lines)
  • Improved cookie persistence to allow multiple persisted trees per page via cookieId option
  • Improved location persistence by making it case-insensitive
  • Improved swapClass and replaceClass plugin implementations
  • Added folder-closed.gif to filetree example

Have fun!


No more comments.
  1. 7. February 2008 |22:48

    the link is broken (?)

  2. Stan
    7. February 2008 |23:01

    Great! Any chance you’ll be moving this into UI? UI is sorely in need of this plugin.

  3. 7. February 2008 |23:26

    Fixed the link!

    Chances are quite good that this gets part of jQuery UI. Once 1.5 is ready and the dust has settled a bit, we’ll likely get into planning which components to add and include in the future.

    So far the idea is to keep this as slim as it is, while adding behaviour like sortables on top of it.

  4. 8. February 2008 |00:30

    great work!

  5. Zaak
    4. March 2008 |14:29

    Great work! But if the sortables will be implemented it will be the Best.

  6. dqj
    11. March 2008 |21:03

    Excellent plugin! I am filling my subtrees dynamically from database queries nicely.

    The state of my tree does not persist, however. I’m sure there is something I have not set right, but I am using the persist: “cookie” option. I put an alert() call in the treeview js and each page tells me that the hierarchy was not stored.

    Can you offer and leads on where to look for problems with the cookie storage?

    Thank you.

  7. dqj
    11. March 2008 |21:05

    I forgot to mention above that my browser (FF) is not showing a cookie for localhost (my server) except for the PHPSESSID.

  8. 12. March 2008 |00:26

    dqj: Persistence and async options don’t work well together so far. Please post further support requests or anything related to the mailing list (see plugin page).