I have a class declared in a script imported before body:
$(document).ready(function(){
var FamilleTree = function() {
};
FamilleTree.prototype.someAlert=function() {
alert("test");
}
});
After that, I have the following code inside the body in a script tag:
$(document).ready(function(){
var famtree= new FamilleTree();
famtree.someAlert();
});
But when I load the page, here is the error from firefox:
ReferenceError: FamilleTree is not defined
The class is defined before the call, why is it not accessible ?