jQuery variables for multiple events
<p>I'd like to be able to define the variable which I can then use for other events, such as mouseout, mouseenter, click etc.</p>

<p>This is the current code:</p>

<pre><code>   $('a div')

    // Get the width an height of the image
    //var $img_width = $(this).children('img').width();
    //var $img_height = $(this).children('img').height();

    .mouseenter(function() {
        alert($img_width)

    })
    .mouseleave(function() { // Animate the image back to it's original size
        alert($img_width);
    })
    .each(function(index) {
        alert($img_width);
    });
</code></pre>
