Javascript/Jquery Pulling HTML Alt Tag Value
I am looking to use javascript or Jquery to pull the alt tag from the specific image that had been clicked in the HTML and copy its value into a caption field.

    function change_image(diff){
      var newAlt = $(this).attr('alt');
      position = (position + diff + hrefs.length) % hrefs.length;
      revealImage(hrefs[position]);
      $nav.find('.counter').html(newAlt);
    }

That is what I have so far and it does not work.  Any advice would be great.
Javascript/Jquery Pulling HTML Alt Tag Value
===

I am looking to use javascript or Jquery to pull the alt tag from the specific image that had been clicked in the HTML and copy its value into a caption field.

    function change_image(diff){
      var newAlt = $(this).attr('alt');
      position = (position + diff + hrefs.length) % hrefs.length;
      revealImage(hrefs[position]);
      $nav.find('.counter').html(newAlt);
    }

That is what I have so far and it does not work.  Any advice would be great.