$('#btn2').toggle(
function () {
$('#btn2').text('show');
},
function () {
$('#btn2').text('hide');
}
)
This does not work on my computer (on any browser). Could this be due to a change in the method between jQuery versions?