Retrieve Button value with jQuery
<p>A simple one, I'm trying to retrieve the value attribute of a button when its been pressed using jQuery, here's what I have:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function() {
        $('.my_button').click(function() {
            alert($(this).val());
        });
    });
&lt;/script&gt;

&lt;button class="my_button" name="buttonName" value="buttonValue"&gt;
    Button Label&lt;/button&gt;
</code></pre>

<p>In Firefox my alert displays 'buttonValue' which is great but in IE7 it displays 'Button Label'.</p>

<p>What jQuery should I use to always get the button's value?  Or should I be using a different approach?</p>

<p>Many thanks.</p>

<p>ANSWER:
I'm now using</p>

<pre><code>&lt;input class="my_button" type="image" src="whatever.png" value="buttonValue" /&gt;
</code></pre>
