I am researching and found post very close to what I need:
The post contained a code which displayed a pop up on the wordpress site I am creating. Now, I am trying to make to change what the pop up contain or displays. However, what I need to be shown is a java script snippet instead of a website.
I am making this code below:
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>ColorBox demo</title>
<link rel="stylesheet" href="http://www.jacklmoore.com/colorbox/example1/colorbox.css" />
</head>
<body>
<h1>Hello, there!</h1>
<h2>This is some content</h2>
<p>The popup will open in five seconds</p>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://www.jacklmoore.com/colorbox/jquery.colorbox.js"></script>
<script>
function openColorBox(){
$.colorbox({iframe:true, width:"80%", height:"80%", href: "http://www.sitepoint.com"});
}
setTimeout(openColorBox, 5000);
</script>
</body>
</html>
To display my java script snippet which is:
<script type="text/javascript" src="https://goo.gl/coH7w8"></script>
Is this possible?
In addition, I also need it very neat. Like to set this pop up, load after 5 seconds on any page of the website our site visitor opens up. But when they close it or already opt-in on it, it will no longer show up if they navigate navigating on other pages of the site.