Can’t call Javascript function – scope?
You need to put your doSomething in the correct namespace, or at least in a namespace. The simplest way would be to put it in the window namespace: jQuery(document).ready(function($) { window.doSomething = function() { alert(“Time for a coffee break!”); }; });