Newbie - Drop down Tree View

Newbie - Drop down Tree View

Hi Folks,

I have a drop down tree view much like windows file explorer drop down tree view  on the left side of navigation screen. 
Issue: Whenever I click on on item in this list (which is hyperlinked), the whole page reloads and the treeview
collapses back, thus hiding the item in that tree.
How do I keep the tree from collapsing and remain expanded when that item is clicked, which loads the content on the right side of web page.

When the tree is expanded it shows the item as (before clicking the item):

<span class="handle opened"></span>events=Object {click= } handle=function()<span> People</span>
<ul class="" style="display:block;"> olddisplay="block"
<span class="handle opened"></span> events=Object { click= } handle=function() <span>Miller</span>
<ul class="" style="display: block;"> olddisplay="block"
<li><span><a class="selected" href="http://localhost/Test/index.phpId=3&amp;MId=16&amp;MTypeId=8">Loser </a>
              </span></li>
</ul>


When the tree collapsed it shows the item as (after clicking the item):

<span class="handle closed"></span>events=Object {click= } handle=function()<span> People</span>
<ul class="" style="display: none;"> olddisplay="block"
<span class="handle closed"></span> events=Object { click= } handle=function() <span>Miller</span>
<ul class="" style="display: none;"> olddisplay="block"
<li><span><a class="selected" href="http://localhost/Test/index.phpId=3&amp;MId=16&amp;MTypeId=8">Loser </a>
              </span></li>
</ul>


The js file content is as follows:

$(document).ready(function() {
  $('#tv ul')
    .hide()
    .prev('span')
    .before('<span></span>')
    .prev()
    .addClass('handle closed')
    .click(function(){

      $(this)
        .toggleClass('closed opened')
        .nextAll('ul')
        .toggle();
    });
});

I tried adding .persist:  "location" or .persist: "cookie", they still don't work in that the collapsed function is lost
and all branches are expanded.

Is persist supported in 1.4.2 ? I can't seem to find this in my jquery 1.4.2 version.

Any help is appreciated