get element clicked jq code example
Example 1: on click jquery
$( "#target" ).click(function() {
alert( "Handler for .click() called." );
});
Example 2: how to get the text of a clicked elemet by javascript
$(document).click(function(event) {
var text = $(event.target).text();
});