function是自定义函数,event应该是事件,data就就是数据,这些都是用程序员自己完成的。
查看一下jquery中bind()的api:
http://api.jquery.com/bind/
The Event object
The handler callback function can also take parameters. When the function is called, the event object will be passed to the first parameter.
The event object is often unnecessary and the parameter omitted, as sufficient context is usually available when the handler is bound to know exactly what needs to be done when the handler is triggered. However, at times it becomes necessary to gather more information about the user's environment at the time the event was initiated. View the full Event Object.
Returning false from a handler is equivalent to calling both .preventDefault() and .stopPropagation() on the event object.
Using the event object in a handler looks like this:
$(document).ready(function() {
$('#foo').bind('click', function(event) {
alert('The mouse cursor is at ('
+ event.pageX + ', ' + event.pageY + ')');
});
});
Note the parameter added to the anonymous function. This code will cause a click on the element with ID foo to report the page coordinates of the mouse cursor at the time of the click.
如果你这里面写的是绑定click方法,我就不知道怎么回事儿了,但如果不是click,而是chick,那就有可能知道data是什么,如下是API中的DEMO:
Has an attached custom event.