(function ($) { // Load contributors var $contributors = $('#contributors'); if ( $contributors.length ) { var fail = function () { $contributors.html('

This project would not be possible without the help of our amazing contributors on GitHub.

'); }; $.ajax({ cache: false, dataType: 'jsonp', timeout: 3000, type: 'GET', url: 'https://api.github.com/repos/codeguy/php-the-right-way/contributors' }).done(function (data) { if ( data.data && data.data.length ) { var $ul = $(''), dataLength = data.data.length; for ( var i = 0; i < dataLength; i++ ) { $ul.append(['
  • ', data.data[i].login, '
  • '].join('')); } $contributors.html($ul); } else { fail(); } }).fail(fail); } })(jQuery);