index.js 409 B

12345678910111213141516
  1. // TODO - Add initial page loading and handlers
  2. (function($,History){
  3. var State = History.getState();
  4. $(document).ready(function(){
  5. if($.isEmptyObject(State.data)){
  6. History.pushState({
  7. type: 'template',
  8. id: 'index'
  9. },'Bugs','page/index');
  10. }
  11. $(window).on('statechange',function(){
  12. State = History.getState();
  13. console.log(State);
  14. }).trigger('statechange');
  15. });
  16. })(jQuery,History);