In JSFiddle, when you set the wrapping to "onLoad" or "onDomready", the functions you define are only defined inside that block, and cannot be accessed by outside event handlers.
Easiest fix is to change:
function something(...)
To:
window.something = function(...)