jquery - ReCaptcha in Fancybox not working -
i trying google recaptcha load fancybox ajax floated modal have on website cant recaptcha element appear...
any ideas how make work?
if change fancybox open code use iframe appears, likewise if make inline works - need work in ajax window...
html code open fancybox window is:
<a class="various fancybox.ajax" href="reply.html">
code in reply.html page have tried basic load , explicit approach per:
<script type="text/javascript"> var onloadcallback = function() { grecaptcha.render('recaptchafield1', { 'sitekey' : 'my_site_key' }); }; </script> <script src="https://www.google.com/recaptcha/api.js?onload=onloadcallback&render=explicit" async defer> </script>
any ideas?fancybox code is:
<script type="text/javascript"> $(document).ready(function() { $(".various").fancybox({ maxwidth : 900, maxheight : 630, fittoview : false, width : '85%', height : '85%', autosize : false, closeclick : false, openeffect : 'none', closeeffect : 'none', padding : 8 ,ajax: { complete: function(jqxhr, textstatus) { alert("ajax loaded - render recaptcha here") } } }); }); </script>
Comments
Post a Comment