title: jquery treeview plugin change link behavior (avoid collapse)
body: <p>I am using the jQuery Treeview plugin. Have a look to the "Sample 1 - default" provided on the demo page of the plugin <a href="http://jquery.bassistance.de/treeview/demo/" rel="nofollow noreferrer">http://jquery.bassistance.de/treeview/demo/</a>. In my case all folders and files are links. If I click for example on the expanded "Folder 2" it will first collapse and then follow to the link location. The behaviour I would like to is, that only collapsed ones will expand first and if it already expanded it will stay like this. </p>
  
  <p>The code in the plugin (jquery.treeview.js) which toggle the behaviour is the following:</p>
  
  <pre><code>66 this.filter(":has(&gt;ul):not(:has(&gt;a))").find("&gt;span").click(function(event) {
  67 toggler.apply($(this).next());
  68 }).add( $("a", this) ).hoverClass(); 
  </code></pre>
  
  <p>I already figured out how to get all the links, which should be changed:</p>
  
  <pre><code>$('a').parent().parent().filter('.collapsable')
  </code></pre>
  
  <p>The result will be a array of all li which are currently collapsable (expanded):
  [li., li.collapsable]</p>
  
  <p>But I don't know how to proceed from there :-( Hopefully someone could help me along...</p>
  
  <p>I already changed sucessfully the linkbehavior for the current selected (class=selected) link with this code:</p>
  
  <pre><code>    $(".current").click(function(e){
          e.preventDefault();
      });
  </code></pre>
  
  <p>Many thanks in advance!</p>