bind click event to an object. Jquery
$( "#foo" ).bind( "click", function() { alert( "User clicked on 'foo.'" ); });