JSFiddle - React, Tailwind, and code Playground

by sijav

HTML

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<div id="header_container">
    <div id="header">
        <div class="headimage">
            <a href="http://site.com/" target="_blank"><img class="headimager" src="http://placehold.it/300x80"/></a>            
        </div>
        <select class="class-selector">
            <option value="">- Select Class -</option>
            <option value="http://fiddle.jshell.net/sijav/mQB5E/show/">class1</option>
            <option value="http://fiddle.jshell.net/sijav/mQB5E/1/show/">class2</option>
            <option value="http://fiddle.jshell.net/sijav/mQB5E/2/show/">class3</option>
            <option value="http://fiddle.jshell.net/sijav/mQB5E/3/show/">class4</option>
            <option value="http://fiddle.jshell.net/sijav/mQB5E/4/show/">class5</option>
            <option value="allclassup">All Updating</option>
            <option value="allclassnup">All Non-Updating</option>
        </select>
        <div class="classcycler">
            <a id="NextClass" href="javascript: void(0);"><font color=#EFEFEF>Next Class</font></a> <font color=red>|</font> <a id="PreviousClass" href="javascript: void(0);"><font color=#EFEFEF>Previous Class</font></a>
        </div>
        <div class="headright">
            <a class="TOPJS" href="javascript: void(0);"><font color=#EFEFEF>Scroll Up</font></a> <br> <a class="KEYJS" href="javascript: void(0);"><font color=#EFEFEF>Scroll Down</font></a>
        </div>
    </div>
</div>
<a id="CLASS0"></a>
<div id="container">
    <table id="gradient-style">
        <tbody>
            <thead>
                <tr>
                    <th scope="col"><a id="CLASS1" optionname="CLASS 1"></a>Class</th>
                    <th scope="col">Test</th>
                    <th scope="col">Data</th>
                    <th scope="col">Test Data</th>
                    <th scope="col">Test Data</th>
                    <th scope="col">Test Data</th>
           ...

CSS

body {
    line-height: 1.6em;
    background-color: #535353;
    overflow-x: scroll;
}

#gradient-style {
    font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
    font-size: 12px;
    margin: 0px;
    width: 100%;
    text-align: center;
    border-collapse: collapse;
}

#gradient-style * {
    white-space: nowrap;
}

#gradient-style th {
    font-size: 13px;
    font-weight: normal;
    line-height: 250%;
    padding-left: 5px;
    padding-right: 5px;
    background: #535353 url('table-images1/gradhead.png') repeat-x;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
    color: #ffffff;
}

#gradient-style th.alt {
    font-family: "Times New Roman", Serif;
    text-align: left;
    padding: 10px;
    font-size: 26px;
}

#gradient-style td {
    padding-left: 5px;
    padding-right: 5px;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #fff;
    color: #00000;
    background: #FFF url('table-images1/gradback.png') repeat-x;
}


#gradient-style tfoot tr td {
    background: #A3D8FF;
    font-size: 12px;
    color: #000;
    padding: 10;
    text-align: left;
}

#gradient-style tbody tr:hover td,
#gradient-style tbody tr.selected td {
    background: #d0dafd url('table-images1/gradhover.png') repeat-x;
    color: #339;
}

body {
    margin: 0;
    padding: 0;
}

#header_container {
    background: #000000 url('table-images1/gradhead.png') repeat-x;
    border: 0px solid #666;
    height: 80px;
    left: 0;
    position: fixed;
    width: 100%;
    top: 0;
}

#header {
    position: relative;
    margin: 0 auto;
    height: 100%;
    width: 100%;
    text-align: center;
    color: #0c0aad;
}

#header .headimage {
}

#header .headmid {
    top: 60%;
    left: 53%;
    position: absolute;
    font-size: 15px;
}

#header .headright {
    top: 15px;
    right: 20px;
    position: fixed;
    font-size: 20px;
    text-align: right;
}

#header .class-selector {
...

JavaScript

$(document).ready( function() {
    FirstTimeInit = true;
    function trClick(){
        $("tr").click(function(){
            $(this).toggleClass('selected').siblings().removeClass('selected');
            if(readCookie($(this).parent().index())){
                if(readCookie($(this).parent().index())==$(this).index())
                    eraseCookie($(this).parent().index());
                else{
                    eraseCookie($(this).parent().index());
                    createCookie($(this).parent().index(),$(this).index(),1);
                }
            }
            else
                createCookie($(this).parent().index(),$(this).index(),1);
        });
    }

    $("#PreviousClass").click(function(){
        $(".class-selector").val($(".class-selector option:selected").prev().val()).change()
    });
    $("#NextClass").click(function () {
        $(".class-selector").val($(".class-selector option:selected").next().val()).change()
    });

    function scrollToAnchor(aid) {
        var aTag = $("a[id='" + aid + "']");
        $('html,body').animate({
            scrollTop: aTag.offset().top - 80
        }, 1);
    }
    currentClass=0;
    $("a.TOPJS").click(function () {
        if(currentClass>0){
            currentClass--
            scrollToAnchor('CLASS'+currentClass);
        }
    });

    $("a.KEYJS").click(function () {
        if($("a[id='CLASS" + currentClass + "']")[0]!=undefined){
            currentClass++
            scrollToAnchor('CLASS'+currentClass);
        }
        else
            scrollToAnchor('CLASSMAX');
    });

    $("a.def").click(function () {
            $('body').animate({
                "scrollLeft": "-=404"
            }, 200);
    });

    $("a.abc").click(function () {
        $("body").animate({
                "scrollLeft": "+=404"
            }, 200);
    });

    function createCookie(name,value,days) {
        var expires;
        if (days) {
            var date = new Date();
           ...