<script>
YUI().use("jsonp", "node",function (Y) {

    var user      = Y.one("#github_user"),
        githubAPI = "https://api.github.com/users/",
        template  = // assignment continued below

    '<table>' +
        '<caption>GitHub user <code>{login}</code> ({name})</caption>' +
        '<thead>' +
            '<tr>' +
                '<th>Repositories</th>' +
                '<th>Gists</th>' +
                '<th>Followers</th>' +
                '<th>Following</th>' +
            '</tr>' +
        '</thead>' +
        '<tbody>' +
            '<tr>' +
                '<td>{public_repos}</td>' +
                '<td>{public_gists}</td>' +
                '<td>{followers}</td>' +
                '<td>{following}</td>' +
            '</tr>' +
        '</tbody>' +
    '</table>';

    function handleJSONP(response) {
        Y.one("#out").setHTML(Y.Lang.sub(template, response.data));
    }

    Y.one("#demo_btn").on("click", function (e) {
        // e.g. https://api.github.com/users/yui?callback={callback}
        var url = githubAPI + user.get("value") + "?callback={callback}";

        Y.jsonp(url, handleJSONP);
    });

});
</script>
