How to access an object's text on click in Jquery
<p>I have an object which contains some details and in HTML I have three hyperlinks: first, second and both. I want it so that when I click on the hyperlinks I can match the object's text and append it on the div.</p>

<pre><code>&lt;head&gt;
   &lt;style&gt;
      .text { border:solid 1px #F00; height:30px;}
   &lt;/style&gt;
   &lt;script type="text/javascript" src="jquery-1.7.2.js"&gt;&lt;/script&gt;
   &lt;script type="text/javascript"&gt;
      var myDate= {
        'first':'hi i am first object',
        'second':'hi i am second object'
      }
      $(function (){
        $('.text').text()
      })
   &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
   &lt;div class="text"&gt;&lt;/div&gt;
   &lt;a href="#"&gt;first&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="#"&gt;second&lt;/a&gt;
   &lt;a href="#"&gt;both&lt;/a&gt;
&lt;/body&gt;
</code></pre>
