Skip to content

Instantly share code, notes, and snippets.

@funkyboy
Created August 19, 2018 14:11
Show Gist options
  • Save funkyboy/cf45dcc9354ad10484a5884f68b8c11b to your computer and use it in GitHub Desktop.
Save funkyboy/cf45dcc9354ad10484a5884f68b8c11b to your computer and use it in GitHub Desktop.
<div id="my-widget"></div>
<script src="https://mydomain.com/widget.js" type="text/javascript"></script>
(function() {
var widget = document.getElementById("my-widget");
widget.innerHTML = "<link type='text/css' href='https://mydomain.com/widget.css' rel='stylesheet'>" +
"<div class='my-content'>"+
"This is my content."+
"</div>";
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment