Jquery pass variable between methods
<p>Couldn't find a clear answer to what I'm trying to achieve. I'm sure it's simple but I'm missing it. </p>

<p>I will be building a list of links on a page that all have the class of "prettyLink" and each will have a title. On mouseover I'm trying to store that title in a variable and remove the title, then on mouseout replace that title with what was stored. (basically removing the title while being moused over and putting it back when moused out)</p>

<p>here is the code:</p>

<pre><code>$('a.prettyLink').mouseover(function() {
   var oldTitle = this.title;
   $(this).removeAttr('title');
}).mouseout(function() {
   $(this).attr('title',oldTitle);
});
</code></pre>

<p>Any help is appreciated. Thanks!</p>
