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