@hortonstudio/main 1.1.23 → 1.1.24
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 +10 -4
- package/package.json +1 -1
- package/styles.css +0 -4
package/animations/hero.js
CHANGED
@@ -248,8 +248,11 @@ export async function init() {
|
|
248
248
|
headingSplits = [];
|
249
249
|
|
250
250
|
if (heading.length > 0) {
|
251
|
-
|
252
|
-
|
251
|
+
// Fresh DOM selection like text.js does
|
252
|
+
const freshHeadings = document.querySelectorAll('[data-hs-hero="heading"] > *:first-child');
|
253
|
+
|
254
|
+
freshHeadings.forEach((textElement, index) => {
|
255
|
+
const parent = textElement.parentElement;
|
253
256
|
const splitType = parent.getAttribute('data-hs-heroconfig') || 'word';
|
254
257
|
|
255
258
|
let splitConfig = {};
|
@@ -289,8 +292,11 @@ export async function init() {
|
|
289
292
|
|
290
293
|
// Split text setup for subheadings
|
291
294
|
if (subheading.length > 0) {
|
292
|
-
|
293
|
-
|
295
|
+
// Fresh DOM selection like text.js does
|
296
|
+
const freshSubheadings = document.querySelectorAll('[data-hs-hero="subheading"] > *:first-child');
|
297
|
+
|
298
|
+
freshSubheadings.forEach((textElement, index) => {
|
299
|
+
const parent = textElement.parentElement;
|
294
300
|
const splitType = parent.getAttribute('data-hs-heroconfig') || 'word';
|
295
301
|
|
296
302
|
let splitConfig = {};
|
package/package.json
CHANGED