I have this simple code which has nothing wrong with it and it runs here but not on JSFiddle. On inspecting the console I find the following error
Uncaught ReferenceError: fn is not defined
LINK TO FIDDLE
var fn = {
one: function() {
alert('1')
},
two: function() {
alert('2')
},
three: function() {
alert('3')
}
};
<button onclick='fn.one()'>1</button>
<button onclick='fn.two()'>2</button>
<button onclick='fn.three()'>3</button>