Skip to content

Instantly share code, notes, and snippets.

@subzero783
Created April 7, 2023 03:01
Show Gist options
  • Save subzero783/05334473a4d903e83a48b03699a2bbe6 to your computer and use it in GitHub Desktop.
Save subzero783/05334473a4d903e83a48b03699a2bbe6 to your computer and use it in GitHub Desktop.
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script>
<script>
hbspt.forms.create({
region: "XXX",
portalId: "XXXXXXXX",
formId: "XXXXXXXXXXXXXXXX",
onFormReady: function($form) {
jQuery("input, textarea").on("focus", function(e) {
jQuery(this).parents(".field").addClass("active")
});
jQuery("input, textarea").on("focusout", function(e) {
jQuery(this).parents(".field").removeClass("active")
});
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment