Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- /*
- * Hack to force Kartra opt-in submit buttons to keep their assigned colors when disabled.
- * This software is provided on an as-is basis. Place in FOOTER tracking and use at your own risk.
- * Brian Katzung <briank@kappacs.com>
- */
- $(function () {
- function update () {
- $('.kartra_optin_submit_btn').each(function (ind, el) {
- var want = 'background-color: ' + el.style.backgroundColor + ' !important; color: ' + el.style.color + ' !important; font-weight: ' + el.style.fontWeight;
- if (want !== el.getAttribute('style')) el.setAttribute('style', want);
- });
- }
- update();
- var bmo = new MutationObserver(update);
- bmo.observe(document.body, { childList: true, subtree: true });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement