我怎么能在jQuery中找到哪些事件与特定元素的实时绑定?
假设我有一个函数,randomFunction它从函数数组中返回一个随机函数.如何找到哪个函数绑定到某个元素?
var arrayOfFunctions = []; //a whole bunch of functions
function randomFunction(array){}; //returns one of those functions
$('#certain_element').live('click', randomFunction(arrayOfFunctions));
Run Code Online (Sandbox Code Playgroud)
与livefor 绑定的函数对应的数组的索引是什么$('#certain_element')?