I'm not sure where to look for this. I'm looking to create a drop down to select a Gist ID and then generate it (embed) in a placeholder div.
I previously had the scripts generated, but hidden, and simply showed them by rel ID. But this is extremely slow with even more than three Gist embeds.
I've tried getScript
, but I guess the document.write
in the Gist embed code just doesn't let it slide.
Can someone point me in the right direction?
The problem here is that document.write used by the Gist embed JavaScript is not executed after page load. To get around this, create an iframe, set its body to the Gist embed JS, and set an onload event to tell the parent to resize the iframe accordingly. Here is my solution: https://gist.github.com/1748966
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With