Selecting text from box that was clicked

Selecting text from box that was clicked

Hi guys, i currently have a page which has lots of boxes with different data in them like this:

  1. <div class="box">
  2. <div class="box_name">Test Name</div>
  3. <div class="time">12:45</div>
  4. <div class="message">A message</div>
  5. <a href="#" id="button">View Content</a>
  6. </div>

and i want to grab the value which is inside the time class div and pass it to the popup box.
currently this gets the value:


$( '#button' ). click (function() { 


            var 


time  = $( '.time' ). html ();  




but because the .time class is used on each box it always passes the content from the first box on the page.

is there no way to implement "$this" into the function so it gets the time value only from the box which was clicked.
im stuck.

hope that made sense

David