I have a problem with understanding how javascript and jquery functions works. In my code i have functions defined as
FunctionName: function()
{
//function body
},
when i am trying to add new function above and then access it i occur error FunctionName is not a function. My code looks like:
handleHash: function() {
//body
},
handleHashChange: function() {
//body
this.handleHash();
//body
},
anotherFunction: function(){
this.handleHash();
//body
},
I occur mentioned error in handleHashChange, but it works perfectly fine with anotherFunction
Why is that? Thank you from advance