Skip to content

Instantly share code, notes, and snippets.

@tomaslin
Created September 5, 2013 15:18
Show Gist options
  • Select an option

  • Save tomaslin/6451591 to your computer and use it in GitHub Desktop.

Select an option

Save tomaslin/6451591 to your computer and use it in GitHub Desktop.
CTA Test code
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<title>Example</title>
<script type="text/javascript">
$(document).ready(function () {
var ctas = $('#ctas'),
ajaxResult = {
channelId: "4061",
displayType: "HD",
duration: 1800,
ends: "2013-09-05T20:30:00Z",
eventId: "987",
source: "EPG",
sourceRef: "4061_987",
starts: "2013-09-05T20:00:00Z"
};
ctas.append('<div class="tvs-rr" channelId="' + ajaxResult.channelId + '" eventId="' + ajaxResult.eventId + '"></div>')
var scr = document.createElement('script');
scr.id = 'tvs-rr-loader';
scr.src = 'http://epgservices.sky.com/rrplugin/loader/PluginLoader/PluginLoader.nocache.js';
document.body.appendChild(scr);
$(document.body).trigger('load');
});
</script>
</head>
<body>
<div id="ctas">
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment