<input type=button id=b1 value='Hide'><br><br>
<div id=d1 class='msg'>Hide this layer by using buttons</div>
<script>
$(document).ready(function() {
///// show ///
$('#b1').click(function(){
if($('#b1').attr('value')=='Hide'){
$(this).val('Show'); // change the value to Show
$('#d1').hide();
}else{
$(this).val('Hide'); // change the value to Hide
$('#d1').show();
}
})
})
</script>