fonejacka
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Plugins
In reply to: [Simple Side Tab] Launch Typeform Modal PopupHi Scot,
No worries, I did actually manage to work out a solution, so I hope it will help others looking to launch their popup typeforms. The code is as follows :
/ filter the tab output from the Simple Side Tab plugin function rum_filter_simple_side_tab_text( $text ) { $text = '<i class="fa fa-rocket"></i> ' . $text; return $text; } add_filter( 'rum_sst_plugin_text_for_tab', 'rum_filter_simple_side_tab_text', 10 , 1 ); //### www.thelogoguy.co.uk Edits - Pop up Rapid Quote add_action('wp_footer', 'rapid_quote_js', 50); function rapid_quote_js() { ?> <script type="text/javascript"> (function($) { $('body').append('<a class="typeform-share button" href="https://crispbranding.typeform.com/to/dzUzhg" data-mode="1" target="_blank" style="display:none;">Launch me!</a>'); $('.rum_sst_contents').on('click', function(e) { e.preventDefault(); $('.typeform-share').trigger('click'); }); var script = document.createElement("script"); script.type = "text/javascript"; script.text = "(function(){var qs,js,q,s,d=document,gi=d.getElementById,ce=d.createElement,gt=d.getElementsByTagName,id='typef_orm_share',b='https://s3-eu-west-1.amazonaws.com/share.typeform.com/';if(!gi.call(d,id)){js=ce.call(d,'script');js.id=id;js.src=b+'share.js';q=gt.call(d,'script')[0];q.parentNode.insertBefore(js,q)}id=id+'_';if(!gi.call(d,id)){qs=ce.call(d,'link');qs.rel='stylesheet';qs.id=id;qs.href=b+'share-button.css';s=gt.call(d,'head')[0];s.appendChild(qs,s)}})()"; // use this for inline script document.body.appendChild(script); })(jQuery); </script> <?PHP }
Thanks again ??
Sam
Viewing 1 replies (of 1 total)