Created
February 20, 2013 21:40
-
-
Save colinhicks/4999886 to your computer and use it in GitHub Desktop.
newsticker consumption
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<ul id="here-is-where-i-want-a-newsticker"></ul> | |
<!-- | |
<script id="ticker-item" type="text/template"> | |
<li>{{ data.headline }}</li> | |
</script> | |
--> | |
<script type="text/javascript"> | |
require(['newsticker', 'jquery', 'newsticker/examples'], function(NewsTicker, $, templates){ | |
var nt = new NewsTicker({ | |
el: $('#here-is-where-i-want-a-newsticker'), | |
url: '...', | |
itemTmpl: templates.item | |
}); | |
}); | |
</script> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment