Can some one explain the meaning of the following code snippet (jQuery.fn[name]) found in the  google jquery.ui.map plugin:
jQuery.each(('click mousedown rightclick dblclick mouseover mouseout drag dragend').split(' '), function(i, name) {
    jQuery.fn[name] = function(a, b) {
        return this.addEventListener(name, a, b);
    };
});
And also how we could bind a callback function to the click event on a map object, I have tried the following but the event does not have the latLng attribute:
$('#map_canvas').gmap().click(function(event) {
        alert(event.latLng);
    });
Thanks in advance.
 
     
     
     
     
    