The solution was to set up the eventListenerHooks before creating the plot:
<script>
$(document).ready(function(){
function myClickHandler(ev, gridpos, datapos, neighbor, plot) {
alert('you have triggered click action');
}
$.jqplot.eventListenerHooks.push(['jqplotClick', myClickHandler]);
var plot1 = $.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]); //moved
});
</script>