Home arrow JavaScript arrow Using the Persist Argument in a TreeView jQuery Navigation System

Using the Persist Argument in a TreeView jQuery Navigation System

Welcome to the fifth episode of a series covering how to build a hierarchical navigation system with the TreeView jQuery plug-in. Comprised of six parts, this series walks you through mastering the main features provided by this plug-in.

TABLE OF CONTENTS:
  1. Using the Persist Argument in a TreeView jQuery Navigation System
  2. Reviewing the unique and toggle options
  3. Creating persistent hierarchical menus with the persist parameter
  4. Saving the status of a tree with cookies with the persist: cookie argument
By: Alejandro Gervasio
Rating: starstarstarstarstar / 2
May 12, 2009

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Among the huge variety of plug-ins that are currently available to use with the jQuery JavaScript library, there's one that may be particularly appealing to many web designers wanting to include hierarchical menus into their web sites very quickly. Of course, in this case I'm talking about the "TreeView" package, a powerful jQuery add-on that allows you to create collapsible navigation systems by using only a few simple JavaScript methods along with some nested HTML lists.

Thus, if you feel curious and wish to learn how to put this library to work for you in a true effortless fashion, then don't hesitate anymore and start reading this group of tutorials right now!

Now that you're aware of the goal of this series, it's time to review the concepts discussed in the previous tutorial. In that article, I explained how to utilize the "unique" option provided by the plug-in for restricting the behavior of a selected tree. When specified, the option permits only one of its branches to be opened at a time. 

I also discussed the use of the "toggle" argument for triggering a trivial JavaScript alert each time one branch of the targeted tree expanded and collapsed alternately. Naturally, the potential of the "toggle" option is remarkable; it can be utilized for invoking any type of callback function, including plain JavaScript code, jQuery statements and so forth. In this case, your imagination is the limit, believe me. 

However, it's probable that at this moment you're wondering if the "TreeView" library permits you to maintain the status of a given tree across several HTTP requests. Fortunately, the answer is a resounding yes! In reality, the plug-in offers another option called "persist" that "recalls" the settings of a tree, in this way implementing an effective persistent mechanism. 

Therefore, in this part of the series I'm going to show how to work with this option, by way of some illustrative code snippets. So, are you ready to continue exploring in detail this capability of the "TreeView" plug-in? Then let's jump in right now! 



 
 
>>> More JavaScript Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

JAVASCRIPT ARTICLES

- Javascript for Beginners: An Introduction
- Introduction to JavaScript
- Adding Elements to a Tree with TreeView jQue...
- Using the Persist Argument in a TreeView jQu...
- Using Unique and Toggle in a TreeView jQuery...
- Using Event Delegation for Mouseover Events ...
- Using the Animate Option in a Treeview jQuer...
- Using HTML Lists with Event Delegation in Ja...
- Opened and Closed Branches on a TreeView jQu...
- Mouseover Events and Event Delegation in Jav...
- Creating a TreeView JQuery Hierarchical Navi...
- Event Delegation in JavaScript
- A Look at the New YUI Carousel Control
- Working with Draggable Elements and Transpar...
- Displaying Pinned Handles with Resizable Con...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: