I’m new to this forum so I apologize if this is confusing. I am trying to create links within a colorbox, I was able to modify this code on the first reply Need a simple popup (modal, on-page-load with time-delay, fast & clean) and made it work for me, but I’m managing a library website and the director would like for patrons (users) to be able to click on the program that’s going on within the colorbox and be redirected to the flyer.pdf
this is the code I have now (I’m just testing it before I put it on the actual website)
<!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>
<p>The popup will open in 1 second</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>
window.onload = function() {
function openColorBox(){
$.colorbox({width:"35%", height:"42%", html:"<p>What's Happening Monday 11/03/14?<hr><p>9:00am-5:00pm Affordable Care Act Help</p><p>10:00am-1:00pm TASC(GED) Exam Study</p><p>6:00pm-7:00pm Yoga for Teens and Adults</p><p>7:00pm-8:30pm Advanced Conversational Englsih Class</p>"});
}
var scr = document.createElement('script');
scr.src = "http://www.jacklmoore.com/colorbox/jquery.colorbox.js";
document.getElementsByTagName('body')[0].appendChild(scr);
setTimeout(openColorBox, 1000);
};
</script>
</body>
</html>
I was able to get it down with this code but it differs and I can’t seem to get a second program name on there…sorry…I’m new to this forum so I apologize if this is confusing.
<script>
function openColorBox(){
$.colorbox({html:function () {
return "9:00am-12:15pm " + "Advanced Conversational English Class".link("http://www.portchester-ryebrooklibrary.org"); }}); } setTimeout(openColorBox,0000);
}});
}
setTimeout(openColorBox, 0000);
</script>