@glitchr/transparent 1.0.30 → 1.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glitchr/transparent",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "Transparent SPA Application",
5
5
  "main": "src/index.js",
6
6
  "access": "public",
@@ -1280,18 +1280,21 @@
1280
1280
 
1281
1281
  $('head').append(function() {
1282
1282
 
1283
- $(Settings.identifier).append(function() {
1283
+ $('body').append(function() {
1284
1284
 
1285
- setTimeout(function() {
1285
+ $(Settings.identifier).append(function() {
1286
1286
 
1287
- // Callback if needed, or any other actions
1288
- callback();
1287
+ setTimeout(function() {
1289
1288
 
1290
- // Trigger onload event
1291
- dispatchEvent(new Event('transparent:load'));
1292
- dispatchEvent(new Event('load'));
1289
+ // Callback if needed, or any other actions
1290
+ callback();
1291
+
1292
+ // Trigger onload event
1293
+ dispatchEvent(new Event('transparent:load'));
1294
+ dispatchEvent(new Event('load'));
1293
1295
 
1294
- }.bind(this), 1);
1296
+ }.bind(this), 1);
1297
+ });
1295
1298
  });
1296
1299
  });
1297
1300
  }
@@ -1652,7 +1655,7 @@
1652
1655
  window.onhashchange = __main__;
1653
1656
  document.addEventListener('click', __main__, false);
1654
1657
 
1655
- $("form").submit(__main__);
1658
+ $("form").on("submit", __main__);
1656
1659
  }
1657
1660
 
1658
1661
  return Transparent;