I have a function in my <head>
$('document').ready(function () {
function shout(msg) {
alert(msg);
}
});
And a button in the <body>
but I am getting function shout not defined
.Why?I am using Firefox 25.
SO has many similar questions and I have tried all but no help.Except this one,which might solve my problem.I didn't get what the answer is talking about.Please anyone elaborate what he is talking about as the two fiddles ,in answer as well as the question are exactly same ,except some property changes on the leftside bar: onload
and No wrap-in <head>
Or what might be the problem?