English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The event.data property contains optional data passed to the event method when the current executing handler is bound.
event.data
Return the data passed by the on() method of each <button> element:
$("button").each(function(i){ $(this).on("click", {value:i}, function(event){ msg = ["button = " + $( this ).index(), "event.data.value = " + event.data.value,"i = " + i]; }); });Test and see‹/›
parameter | description |
---|---|
event | theeventparameter comes from the event binding feature |