Is there a way to trigger the loading of a CTA?
I want to be able to manually (or if a another event is triggered), insert a CTA into a div.
Thanks!
Is there a way to trigger the loading of a CTA?
I want to be able to manually (or if a another event is triggered), insert a CTA into a div.
Thanks!
Hey @jonydov,
Are you referring to the HubSpot CTA? If so, I believe this is possible. Here’s an example code that works just fine for me:
<div id="testdiv" style="display:none;">
// I place my HubSpot CTA embed code here
</div>
<button id="show">Show hidden div</button>
<script>
$(function() {
$('#show').click(function() {
$('#testdiv').show();
});
});
</script>
The event triggered here is the button id - show. Once that’s clicked, the #testdiv div will show. Hope this helps!
Thanks for the reply!
I was wondering if the button can be actually generated on event, rather than simply show/hide it.
Hey @jonydov,
I tried to play around with it but I do not believe it is possible to generate the button within a function. The best way to go about doing this is placing the button within a div.
Thank you!