JSFiddle - React, Tailwind, and code Playground

by Chris Hughes

JavaScript

$(document).ready(function () {
    $('.fancybox').fancybox({
        padding: 10,
            'height': 300,
            'width': 1000,
            'autoSize': true,
        closeClick: true,
        closeBtn: true,
        helpers: {
            title: {
                type: 'inside'
            },
            buttons: {}
        }
    });
});



function myFunction() {


                    //Declaring initial variables
                    var chart;
                    var daysInMonth = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31];
                    var ranges;
                    var CityCode = "NULL";

                    //Set city code based on user selection    
                   
                        CityCode = "NUF";
                        CityCode2 = 'Newark Univ Farm';
                 
                    $.ajaxSetup({
                        async: false
                    });

                    // Sets AJAX call to get Monthly data from files
                    var test_variable = "Tmax";
                    $.getJSON('CLIMATE_NORMS/ajax.php?station_code=' + CityCode + '&test_variable=' + test_variable + '&test_type=Monthly', function (data) {
                        monthly_Tmax = data;
                    });
                    test_variable = "Tmean";
                    $.getJSON('CLIMATE_NORMS/ajax.php?station_code=' + CityCode + '&test_variable=' + test_variable + '&test_type=Monthly', function (data) {
                        monthly_Tmean = data;
                    });
                    test_variable = "Tmin";
                    $.getJSON('CLIMATE_NORMS/ajax.php?station_code=' + CityCode + '&test_variable=' + test_variable + '&test_type=Monthly', function (data) {
                        monthly_Tmin = data;
                    });
                    test_variable = "P";
                    $.getJSON('CLIMATE_NORMS/ajax.php?station_code=' + CityCode +...