falsandtru / pjax-api

The advanced PJAX superior to SPA.
https://falsandtru.github.io/pjax-api/
Apache License 2.0
318 stars 28 forks source link

Broke other scripts #21

Closed hugofabricio closed 8 years ago

hugofabricio commented 8 years ago

Hi,

I organize my code in modules and start other scripts in init.

example

// Common
window.mod.common = function() {

  // Scope
  var that = this;

  var init = function() {
    console.log('[brz] begin common.js');

    window.mod.navbar = new window.mod['navbar']();
    window.mod.mask = new window.mod['mask']();
    window.mod.radio = new window.mod['radio']();
    window.mod.player = new window.mod['player']();

  };

If access via browser or no pjax, the plugins works, but i use pjax, the plugins not instance, example window.mod.player and does not generate errors.

Have you ever had it?

hugofabricio commented 8 years ago

Solved. I call in pjax-ready

falsandtru commented 8 years ago

Okay, can you close this issue?