jquery button click' code example
Example 1: jquery click function
$( "#target" ).click(function() {
alert( "Handler for .click() called." );
});
Example 2: button click function in js
<script>
$(document).ready(function(){
$('#MyButton').click(function(){
CapacityChart();
});
});
</script>
<input type="button" value="Capacity Chart" id="MyButton" >