<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&MId=16&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&MId=16&MTypeId=8">Loser </a>
</span></li>
</ul>
$(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
Is persist supported in 1.4.2 ? I can't seem to find this in my jquery 1.4.2 version.