how to check element has event or not in jquery

JavaScript
$("#foo").unbind('click');
Source

Also in JavaScript: