Accessing DOM elements outside of $(this).each function()
<p>I have a div on a JSP that I want to populate when I mouse over items associated 
with a particular css class but it looks like I'm hitting a scope issue. Any idea
what I'm doing wrong?</p>

<p>JSP:
$('.hoverTrigger').myFunc();</p>


Text goes here


<p>

<p>JavaScript .js file referenced by JSP:</p>

<pre><code>$.fn.myFunc = function(options) {
  $(this).each(function() {
    $this.hover(
       function() {
         // Want to set text in messageBox here but not working
         $('#messageBox').after("Hover IN").remove();
       },
       function() {
         // Want to set text in messageBox here but not working
         $('#messageBox').after("Hover OUT").remove();
       }
    );

  });
};
</code></pre>
