|
1 | 1 | <html>
|
2 | 2 | <head>
|
3 |
| - <title>jQuery GitHubBadge Tester</title> |
| 3 | + |
| 4 | +<title>Erik Zaadi @ GitHub -> jQuery Plugins -> jQuery GitHub Badge 1.0 -> Sample Page</title> |
4 | 5 |
|
5 | 6 | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
|
6 | 7 |
|
7 | 8 | <script type="text/javascript" src="../jquery.GitHubBadge.min.js"></script>
|
8 | 9 |
|
9 | 10 | <script type="text/javascript">
|
10 | 11 | $(document).ready(function() {
|
11 |
| - $("#GetGithHubBadge").click(function() { |
| 12 | + $("#GetGithHubBadgeAdvancedUsage").click(function() { |
12 | 13 | $('#toBadge').GitHubBadge({ user: $("#GithHubUser").val(), showErrors: true, validateUser: true });
|
13 | 14 | });
|
14 |
| - $("#GetGithHubBadgeSimple").click(function() { |
| 15 | + $("#GetGithHubBadgeSimpleUsage").click(function() { |
15 | 16 | $('#toBadge').GitHubBadge($("#GithHubUser").val());
|
16 | 17 | });
|
17 | 18 | });
|
|
55 | 56 | <body>
|
56 | 57 | <h2>
|
57 | 58 | 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> |
58 | 71 | <div>
|
59 | 72 | <label>
|
60 | 73 | 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" /> |
63 | 76 | <hr />
|
64 | 77 | <div id="toBadge" style="width : 350px;">
|
65 | 78 | This is where the badge will be.<br />
|
|
0 commit comments