events.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. App.Events = (function(lng, undefined) {
  2. lng.ready(function() {
  3. //lng.View.Aside.toggle('.onright');
  4. setTimeout(function() {
  5. lng.View.Element.progress('#progress-normal', 50, true, 'yeah');
  6. lng.View.Element.progress('#progress-big', 75, true, 'yeah');
  7. lng.View.Element.loading('#loading-code', 'white');
  8. }, 1000);
  9. });
  10. $$('section#sec-1 header #btn-toggle-loading').tap(function(event) {
  11. var el = lng.dom(this);
  12. el.children('.icon').hide();
  13. lng.View.Element.loading(this, 'white');
  14. });
  15. //SPECIAL
  16. $$('section#sec-1').on('load', function(event) {
  17. console.error('section#sec-1 loaded', event);
  18. console.error('current section', lng.Element.Current.section);
  19. lng.Router.article('sec-1', 'nav-2');
  20. });
  21. $$('section#sec-2').on('unload', function(event) {
  22. console.error('section#sec-2 unloaded', event);
  23. });
  24. $$('section#sec-2').on('load', function(event) {
  25. console.error('section#sec-2 loaded', event);
  26. });
  27. $$('article#nav-1').on('load', function(event) {
  28. console.error('article#nav-1 loaded', event);
  29. });
  30. $$('article#nav-3').on('unload', function(event) {
  31. console.error('article#nav-1 unloaded', event);
  32. });
  33. })(LUNGO);