Skip to content

Commit

Permalink
Updated title.. prettified sample
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzaadi committed Aug 2, 2009
1 parent 94d65e2 commit c443196
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions jQuery.GitHubBadge/Sample/Sample.html
@@ -1,17 +1,18 @@
<html>
<head>
<title>jQuery GitHubBadge Tester</title>

<title>Erik Zaadi @ GitHub -> jQuery Plugins -> jQuery GitHub Badge 1.0 -> Sample Page</title>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" src="../jquery.GitHubBadge.min.js"></script>

<script type="text/javascript">
$(document).ready(function() {
$("#GetGithHubBadge").click(function() {
$("#GetGithHubBadgeAdvancedUsage").click(function() {
$('#toBadge').GitHubBadge({ user: $("#GithHubUser").val(), showErrors: true, validateUser: true });
});
$("#GetGithHubBadgeSimple").click(function() {
$("#GetGithHubBadgeSimpleUsage").click(function() {
$('#toBadge').GitHubBadge($("#GithHubUser").val());
});
});
Expand Down Expand Up @@ -55,11 +56,23 @@
<body>
<h2>
jQuery GitHubBadge Tester</h2>
<div>
<h3>Usage :</h3>
<h4>Simple Usage : </h4>
<pre><code>$('Selector').GitHubBadge('usernamestring');</code></pre>
<h4>Advanced Usage : </h4>
<pre><code>$('Selector').GitHubBadge({
user: 'usernamestring', // Mandatory (Duh!)
showErrors: true, //Display error messages (default:false)
showForks: true, //Shows not only personal public repositories, but forks as well (default:true)
validateUser: true //Validates that user exists (404 can not be detecteted, due to JSONP..), NOTE: Generates an extra request (default:false)
});</code></pre>
</div>
<div>
<label>
Enter User<input type="text" id="GithHubUser" /></label>
<input type="button" value="Get GithHub Badge" id="GetGithHubBadge" />
<input type="button" value="Get GithHub Badge (SimpleMode)" id="GetGithHubBadgeSimple" />
<input type="button" value="Advanced Usage " id="GetGithHubBadgeAdvancedUsage" />
<input type="button" value="Simple Usage" id="GetGithHubBadgeSimpleUsage" />
<hr />
<div id="toBadge" style="width : 350px;">
This is where the badge will be.<br />
Expand Down

0 comments on commit c443196

Please sign in to comment.