Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed widget test

  • Loading branch information...
commit 81a57bbf3e5a6359e9f8b51644c0fd612cd730ce 1 parent 3555453
Dave Cross authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 test.html
13 test.html
View
@@ -1,25 +1,26 @@
<html>
<head>
<title>Travis-CI Widget Test</title>
- <script src="//code.jquery.com/jquery-1.10.2.js"></script>
+ <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<h1>Travis-CI Widget Test</h1>
<div id="here"></div>
<script type="text/javascript">
(function() {
- alert("Hello");
$.getJSON( "https://api.travis-ci.org/repos/davorg/lystyng/builds", function( data ) {
var items = [];
- $.each( data, function( build ) {
- items.push( "<li id='" + build.id + "'>" + build.number + "</li>" );
+ $.each( data, function( index, build ) {
+ if (index < 5) {
+ items.push( "<li id='" + build.id + "'><a href=\"\">Build " +
+ build.number + "</a>" + "</li>" );
+ }
});
- $( "<ul/>", {
+ $( "<ol/>", {
"class": "my-new-list",
html: items.join( "" )
}).appendTo( "body" );
});
- alert("Goodbye");
})();
</script>
</body>
Please sign in to comment.
Something went wrong with that request. Please try again.