Quand j'écris book.main.method();
je suis arrivé erreur : Uncaught TypeError: Fonction Object() {Erreur: Uncaught TypeError: Fonction objet
window.book = window.book|| {};
book.control = function() {
var check_is_ready = 'check_is_ready';
if(check_is_ready == 'check_is_ready') {
this.startbook = function() {
var bookMain = new book.main();
bookMain.method();
return;
};
};
};
$(function() {
var control = new book.control();
control.startbook();
});
(function() {
book.main = function() {
var index =0;
this.method = function() {
index++;
if (index <= 500){
book.main.method();// <-- this wrong
// the error which I get :Uncaught TypeError: Object function() {
alert (index);
}
};
};
})();
Que dois-je écrire à la place book.main.method();
de l'invoquer avec l'erreur sur?
merci beaucoup
Je pense que cela peut être une amélioration sur votre code pour le moment, ne résout pas votre problème mais j'ai peur. http://pastebin.com/6pvmdBKp – Undefined