<button> clickability study

by Gerald Fullam

HTML

<button>1</button>
<button><span class="number">2</span></button>
<button type="button"><span>3</span></button>
<div id="message"></div>

JavaScript

$('button').click(function() {
    $('#message').html($(this).text());
});