simplePage.js 545B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. *
  3. * @authors Eric Hsiao
  4. *
  5. */
  6. simplePage = function (){
  7. //private menbers
  8. //private methods
  9. function init () {
  10. console.log('simplePage is loaded.');
  11. }
  12. function intoPage() {
  13. if(currentPage != undefined) currentPage.leavePage();
  14. }
  15. function leavePage() {
  16. }
  17. //constructor
  18. {
  19. $(document).ready(function() {
  20. init();
  21. });
  22. }
  23. //public
  24. return {
  25. intoPage : function () {
  26. intoPage();
  27. },
  28. leavePage : function () {
  29. leavePage();
  30. }
  31. };
  32. };
  33. var simplePage = new simplePage();