Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 1.13 KB

File metadata and controls

45 lines (38 loc) · 1.13 KB

Example

This section provides a complete, working example.

  • Download the minified plugin jquery.github.min.js
  • Copy and paste the following code into a new file github.html
<!DOCTYPE html>
<html lang="en">
	<head>
		<!-- Bootstrap CDN -->
		<link href="http://bit.ly/WcHlyO" rel="stylesheet">
		<!-- jQuery CDN -->
		<script src="http://code.jquery.com/jquery-latest.js"></script>
		<!-- GitHub plugin -->
		<script src="jquery.github.min.js"></script>

		<script type="text/javascript">
			$(document).ready(function(){
				$('#github').github({
					// put your username here
					   'user': 'you',
					// number of commits to show
					'display': 5
				});
			});
		</script>
	</head>
	<body>
		<div id="github">
			<!-- plugin will render here... -->
		</div>
	</body>
</html>
  • Replace 'you' (in the code) with your GitHub user name.

  • Start a web server in the directory where github.html lives:

$ python -m SimpleHTTPServer 8888