Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.book = window.book|| {};
- window.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;
- };
- };
- },
- 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);
- }
- };
- };
- }
- $(function() {
- var control = new book.control();
- control.startbook();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement