add CSS instead of inline styles to button div

This commit is contained in:
Cappy Popp 2021-01-11 16:58:24 -05:00
parent 014723144c
commit b5c599a116

View File

@ -1,3 +1,9 @@
<style>
.liAutoFill {
text-align: center;
margin: 0px 10px;
}
</style>
<script> <script>
(function () { (function () {
var fillScript = document.createElement('script'), // the LI autofill script (client-side) var fillScript = document.createElement('script'), // the LI autofill script (client-side)
@ -100,13 +106,14 @@
liAutoFillScript.defer = true; // as opposed to default 'async' liAutoFillScript.defer = true; // as opposed to default 'async'
// add the iframe to the holder div // add the iframe to the holder div
iframeHolderDiv.setAttribute('class', 'liAutoFill');
iframeHolderDiv.appendChild(fillScript); iframeHolderDiv.appendChild(fillScript);
autoFillLocation.prepend(iframeHolderDiv); autoFillLocation.prepend(iframeHolderDiv);
autoFillLocation.append(liAutoFillScript); autoFillLocation.append(liAutoFillScript);
// moved from above to ensure it's in DOM before adding styles // moved from above to ensure it's in DOM before adding styles
iframeHolderDiv.style.textAlign = 'center'; // iframeHolderDiv.style.textAlign = 'center';
iframeHolderDiv.style.margin = '10px 0px'; // iframeHolderDiv.style.margin = '10px 0px';
if (typeof MktoForms2 !== 'undefined') { if (typeof MktoForms2 !== 'undefined') {
MktoForms2.whenReady(function (form) { MktoForms2.whenReady(function (form) {