Skip to content

Commit 59f0286

Browse files
committed
fixed contact form issue
1 parent 78404d6 commit 59f0286

File tree

2 files changed

+26
-24
lines changed

2 files changed

+26
-24
lines changed

assets/js/marquee.js

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
function Marquee(selector, speed) {
2-
const parentSelector = document.querySelector(selector);
3-
const clone = parentSelector.innerHTML;
4-
const firstElement = parentSelector.children[0];
5-
let i = 0;
6-
console.log(firstElement);
7-
parentSelector.insertAdjacentHTML('beforeend', clone);
8-
parentSelector.insertAdjacentHTML('beforeend', clone);
9-
10-
setInterval(function () {
11-
firstElement.style.marginLeft = `-${i}px`;
12-
if (i > firstElement.clientWidth) {
13-
i = 0;
14-
}
15-
i = i + speed;
16-
}, 0);
17-
}
18-
19-
//after window is completed load
20-
//1 class selector for marquee
21-
//2 marquee speed 0.2
22-
window.addEventListener('load', Marquee('[data-trusted-brands]', 0.5))
1+
function Marquee(selector, speed) {
2+
const parentSelector = document.querySelector( selector );
3+
4+
if (!parentSelector) return
5+
const clone = parentSelector.innerHTML;
6+
const firstElement = parentSelector.children[0];
7+
let i = 0;
8+
console.log(firstElement);
9+
parentSelector.insertAdjacentHTML('beforeend', clone);
10+
parentSelector.insertAdjacentHTML('beforeend', clone);
11+
12+
setInterval(function () {
13+
firstElement.style.marginLeft = `-${i}px`;
14+
if (i > firstElement.clientWidth) {
15+
i = 0;
16+
}
17+
i = i + speed;
18+
}, 0);
19+
}
20+
21+
//after window is completed load
22+
//1 class selector for marquee
23+
//2 marquee speed 0.2
24+
window.addEventListener('load', Marquee('[data-trusted-brands]', 0.5))

template-parts/sections/contact/section-contact.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
<span class="font-semibold">Please don't hesitate to contact us,</span> and we will do our very best to get back to you as soon as possible. Thank You.
2929
</p>
3030
</div>
31-
<form class="space-y-10 xl:w-2/3 w-full">
31+
<div class="space-y-10 xl:w-2/3 w-full">
3232
<?php echo do_shortcode( '[contact-form-7 id="04be99f" title="Contact form 1"]'); ?>
33-
</form>
33+
</div>
3434
<div class="absolute bottom-20 right-0 xl:block hidden">
3535
<img src="<?= esc_url(get_template_directory_uri()); ?>/assets/images/vector/contact.svg" />
3636
</div>

0 commit comments

Comments
 (0)