@hortonstudio/main 1.1.6 → 1.1.8
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/animations/hero.js +1 -1
- package/animations/transition.js +12 -3
- package/package.json +1 -1
package/animations/hero.js
CHANGED
package/animations/transition.js
CHANGED
@@ -2,7 +2,18 @@
|
|
2
2
|
const API_NAME = 'hsmain';
|
3
3
|
export async function init() {
|
4
4
|
|
5
|
-
//
|
5
|
+
// Register the transition logic to run after Webflow is ready
|
6
|
+
window[API_NAME].afterWebflowReady(() => {
|
7
|
+
// Only run if jQuery is available
|
8
|
+
if (typeof $ !== 'undefined') {
|
9
|
+
initTransitions();
|
10
|
+
}
|
11
|
+
});
|
12
|
+
|
13
|
+
return { result: 'anim-transition initialized' };
|
14
|
+
}
|
15
|
+
|
16
|
+
function initTransitions() {
|
6
17
|
let transitionTrigger = $(".transition-trigger");
|
7
18
|
let introDurationMS = 800;
|
8
19
|
let exitDurationMS = 400;
|
@@ -36,6 +47,4 @@ export async function init() {
|
|
36
47
|
setTimeout(() => {$(window).on("resize", function () {
|
37
48
|
setTimeout(() => {$(".transition").css("display", "none");}, 50);});
|
38
49
|
}, introDurationMS);
|
39
|
-
|
40
|
-
return { result: 'anim-transition initialized' };
|
41
50
|
}
|