Skip to content

Commit c443196

Browse files
committed
Updated title.. prettified sample
1 parent 94d65e2 commit c443196

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

jQuery.GitHubBadge/Sample/Sample.html

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<html>
22
<head>
3-
<title>jQuery GitHubBadge Tester</title>
3+
4+
<title>Erik Zaadi @ GitHub -> jQuery Plugins -> jQuery GitHub Badge 1.0 -> Sample Page</title>
45

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

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

910
<script type="text/javascript">
1011
$(document).ready(function() {
11-
$("#GetGithHubBadge").click(function() {
12+
$("#GetGithHubBadgeAdvancedUsage").click(function() {
1213
$('#toBadge').GitHubBadge({ user: $("#GithHubUser").val(), showErrors: true, validateUser: true });
1314
});
14-
$("#GetGithHubBadgeSimple").click(function() {
15+
$("#GetGithHubBadgeSimpleUsage").click(function() {
1516
$('#toBadge').GitHubBadge($("#GithHubUser").val());
1617
});
1718
});
@@ -55,11 +56,23 @@
5556
<body>
5657
<h2>
5758
jQuery GitHubBadge Tester</h2>
59+
<div>
60+
<h3>Usage :</h3>
61+
<h4>Simple Usage : </h4>
62+
<pre><code>$('Selector').GitHubBadge('usernamestring');</code></pre>
63+
<h4>Advanced Usage : </h4>
64+
<pre><code>$('Selector').GitHubBadge({
65+
user: 'usernamestring', // Mandatory (Duh!)
66+
showErrors: true, //Display error messages (default:false)
67+
showForks: true, //Shows not only personal public repositories, but forks as well (default:true)
68+
validateUser: true //Validates that user exists (404 can not be detecteted, due to JSONP..), NOTE: Generates an extra request (default:false)
69+
});</code></pre>
70+
</div>
5871
<div>
5972
<label>
6073
Enter User<input type="text" id="GithHubUser" /></label>
61-
<input type="button" value="Get GithHub Badge" id="GetGithHubBadge" />
62-
<input type="button" value="Get GithHub Badge (SimpleMode)" id="GetGithHubBadgeSimple" />
74+
<input type="button" value="Advanced Usage " id="GetGithHubBadgeAdvancedUsage" />
75+
<input type="button" value="Simple Usage" id="GetGithHubBadgeSimpleUsage" />
6376
<hr />
6477
<div id="toBadge" style="width : 350px;">
6578
This is where the badge will be.<br />

0 commit comments

Comments
 (0)