title: How to retrieve a clicked element in a Jquery treeview
body: <p>I am willing to use the jquery treeview.  I have categories and subcategories to choose for an item and I would like to display them in a treeview. I would like then to get the clicked value.</p>
  
  <p>for the moment I am working on something of the kind of  :</p>
  
  <pre><code>&lt;ul id="treeview"&gt;
      &lt;li&gt;group1a
          &lt;ul&gt;
              &lt;li&gt;group11 &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;group2 &lt;/li&gt;
      &lt;li&gt;group3 &lt;/li&gt;
      &lt;li&gt;group4 &lt;/li&gt;
      &lt;li&gt;group5 &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>and I tried this script, but the click function throw me an error.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
              $().ready(function () {
                  $("#treeview").treeview();
              });
  
              $("#treeview").click(function (e) {
                  e.target.addClass("selected");
              });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I am a very big beginner to this Jquery way of handling things, so I assume I am missing some important point somewhere... thanks for your help..</p>