Last active
November 2, 2018 02:40
-
-
Save PatrickKennedy/054e7e604f34c12f3eb996f3ce04c4d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ready(fn) { | |
if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading"){ | |
fn(); | |
} else { | |
document.addEventListener('DOMContentLoaded', fn); | |
} | |
} | |
ready(function () { | |
let typeformButton = document.getElementsByClassName('typeform-share button')[0]; | |
if (window.location.hash === "#getquote") { | |
typeformButton.click() | |
} | |
document | |
.querySelectorAll('.extra-quote-button') | |
.forEach(function (element) { | |
element.addEventListener('click', function () { typeformButton.click() }); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment