I have created a function inside a .click
$('#BeforeFunction').click(function(){
//something is entered here then the function below is called
Hello();
});
$('#HitMe').click(function(){
//something here.....
function Hello(){
alert ('Hit button is pressed');
}
});
But the function when called causes an error, the message being Hello is not defined.
What is wrong exactly?