Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
               <table  id="first" class="d-flex justify-content-center">
          <tr>
              <td valign='baseline' colspan="1"><p>Streamers</p></td>

              <th colspan="1" valign="top">
                  <button id="all" type="button" name="button" class="btn btn-outline-primary" data-toggle="tooltip" title="All Streamers">ALL</button>
                  <button id="online" type="button" name="button" class="btn btn-outline-primary" data-toggle="tooltip" title="Online Streamers">ONLINE</button>
                  <button id="offline" type="button" name="button" class="btn btn-outline-primary" data-toggle="tooltip" title="Offline Streamers">OFFLINE</button>
              </th>
          </tr>

          <tr valign='bottom' id="fcc" class="tPad">
              <td id="fccImg"><img src="https://static-cdn.jtvnw.net/jtv_user_pictures/freecodecamp-profile_image-d9514f2df0962329-300x300.png" alt="free code camp icon"/></td>
              <td id="fccLink"><a href="https://www.twitch.tv/freecodecamp" target="_blank">FreeCodeCamp</a></td>
              <td id="FreeCodeCamp">status</td>
          </tr>
          <tr valign='bottom' id="esl">
              <td id="eslImg"><img src="https://static-cdn.jtvnw.net/jtv_user_pictures/esl_sc2-profile_image-d6db9488cec97125-300x300.jpeg" alt="ESL_SC2 icon"/></td>
              <td id="eslLink"><a href="https://www.twitch.tv/ESL_SC2" target="_blank">ESL_SC2</a></td>
              <td id="ESL_SC2">status</td>
          </tr>
          <tr valign='bottom' id="cret">
              <td id="cretetImg"><img src='https://static-cdn.jtvnw.net/jtv_user_pictures/cretetion-profile_image-12bae34d9765f222-300x300.jpeg'/></td>
              <td id="cretLink"><a href='https://www.twitch.tv/cretetion' target='_blank'>Cretetion</a></td>
              <td id="Cretetion">status</td>
          </tr>
          <tr valign='bottom' id="ty">
              <td id="tyImg"><img src='https://static-cdn.jtvnw.net/jtv_user_pictures/f3591dbe4ee3d94b-profile_image-300x300.png'/></td>
              <td id="tyLink"><a href='https://www.twitch.tv/loltyler1' target='_blank'>loltyler1</a></td>
              <td id="loltyler1">status</td>
          </tr>

      </table>

            
          
!

CSS

            
              h1{
    display: inline;
    padding-right: 20px;
}


#first{
    padding-top: 8%;
}

body{
    background-color: #cee3ef;
}

img{
    height: 30px;
    width: 30px;
    border-radius: 50%;
}

tPad{
    padding-top: 40px;
}

p{
    padding-right: 30px;
    font-size: 30px;
}

            
          
!

JS

            
              $(document).ready(function() {
    //varibles
    var mainLink = 'https://wind-bow.gomix.me/twitch-api';
    var channelLink = 'https://wind-bow.gomix.me/twitch-api/channels/';
    var userLink = 'https://wind-bow.gomix.me/twitch-api/users/';
    var streamsLink = 'https://wind-bow.glitch.me/twitch-api/streams/';

    //functions
    //detirmines wether channel is streaming or not
    function activeStatus(name){
        $.getJSON(streamsLink + name, function(json) {
                console.log(json.stream);
        });
    }

    //if channel is streaming this works
    function status(stat){
        $.getJSON(streamsLink + stat, function(json) {
                /*optional stuff to do after success */
                $('#'+ stat).text(json.stream.game + ': ' + json.stream.channel.status);

        });
    }

    //detirmines esl_sc2 status
    if (status('ESL_SC2')) {
            status('ESL_SC2');
    } else {
        //give info about whats streaming
        $('#ESL_SC2').text('OFFLINE');
    }

    //detirmines fcc status
    if (status('FreeCodeCamp')) {
            status('FreeCodeCamp');
    } else {
        //give info about whats streaming
        $('#FreeCodeCamp').text('OFFLINE');
    }

    //detirmines cretetion status
    if (status('Cretetion')) {
            status('Cretetion');
    } else {
        //give info about whats streaming
        $('#Cretetion').text('OFFLINE');
    }

    //detirmines loltyler1 status
    if (status('loltyler1')) {
            status('loltyler1');
    } else {
        //give info about whats streaming
        $('#loltyler1').text('OFFLINE');
    }

    //shows all streamers
    $('#all').click(function() {
        /* Act on the event */
        $('#fcc').show();
        $('#esl').show();
        $('#cret').show();
        $('#ty').show();
    });

    //shows online Streamers
    $('#online').click(function() {

        //shows esl_sc2 when online
        if (status('esl_sc2')) {
            $('#esl').show();
        } else {
            $('#esl').hide();
        }
        //shows FreeCodeCamp when online
        if (status('freecodecamp')) {
            $('#fcc').show();
        } else {
            $('#fcc').hide();
        }
        //shows loltyler1 when online
        if (status('loltyler1')) {
            $('#ty').show();
        } else {
            $('#ty').hide();
        }
        //shows cretetion when online
        if (status('cretetion')) {
             $('#cret').show();
        } else {
            $('#cret').hide();
        }
    });
});

            
          
!
999px

Console