Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (38 sloc) 1.8 KB
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>jquery-github: Example of fetching a user's public json feed.</title>
<meta name="description" content="">
<meta name="author" content="Jaime Bueza">
<link rel="stylesheet" type="text/css" href="css/combined.css">
<script src="js/modernizr-1.6.min.js"></script>
</head>
<body>
<div id="container">
<h1>jQuery plugin for fetching github public profile feed</h1>
<p>Uses JSONP and oh yeah, I &lt;3 octocat.</p>
<p>Fun for plugging this into your blog. Probably can be plugged into a Wordpress module.</p>
<div id="feed"></div>
</div> <!--! end of #container -->
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.github.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.tmpl.js" type="text/javascript" charset="utf-8"></script>
<script id="tmplGithub" type="text/x-jquery-tmpl">
<p>[${actor}] <a href="${url}" title="${payload.action} by ${actor}">${type}</a> on <span class="date">${created_at}</span></p>
</script>
<script>
$(document).ready(function() {
$("#feed").github({ user: 'jbueza' }, function(data) {
$("#tmplGithub").tmpl( data ).appendTo("#feed");
});
});
</script>
</body>
</html>