Skip to content

Instantly share code, notes, and snippets.

@tubalmartin
Created March 10, 2012 16:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tubalmartin/2011869 to your computer and use it in GitHub Desktop.
Save tubalmartin/2011869 to your computer and use it in GitHub Desktop.
Wufoo async snippet: optimized version
<div id="wufoo-z7w3m7">
Fill out my <a href="http://examples.wufoo.com/forms/z7w3m7">online form</a>.
</div>
<script type="text/javascript">
var z7w3m7;
!function(d, t) {
var s = d.createElement(t)
, options = {
'userName':'examples',
'formHash':'z7w3m7',
'autoResize':!0,
'height':'260',
'async':!0,
'header':'show',
'ssl':!0}
, scr;
s.src = d.location.protocol + '//wufoo.com/scripts/embed/form.js';
s.onload = s.onreadystatechange = function() {
if (/^c|loade/.test(this.readyState + '')) {
try { z7w3m7 = new WufooForm();z7w3m7.initialize(options);z7w3m7.display(); } catch (e) {}
}
};
scr = d.getElementsByTagName(t)[0]; scr.parentNode.insertBefore(s, scr);
}(document, 'script');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment