{"size": 1006, "ext": "js", "max_stars_repo_path": "public/js/tables/option-table.js", "max_stars_repo_name": "rexielynsantos/foundry-capstone", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/js/tables/option-table.js", "max_issues_repo_name": "rexielynsantos/foundry-capstone", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/js/tables/option-table.js", "max_forks_repo_name": "rexielynsantos/foundry-capstone", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.3953488372, "max_line_length": 74, "alphanum_fraction": 0.449304175}
var btnAddOptt = $('#btnAddOption');
var btnEditOptt = $('#btnEditOption');
var btnDeleteOptt = $('#btnDeleteOption');

var tblopt = $('#optionTable').DataTable();


// CHANGE TABLE NAME
$('#optionTable tbody').on('click', 'tr', function()
    {
        if(!$(this).hasClass('active') && tblopt.rows().data().length > 0)
        {
            $(this).addClass('active');
        }
        else
        {
            $(this).removeClass('active');
        }

        if(tblopt.rows('tr.active').data().length != 0)
        {

            if(tblopt.rows('tr.active').data().length == 1)
            {
              btnAddOptt.hide();
              btnEditOptt.show();
              btnDeleteOptt.show();
            }
            else
            {
              btnAddOptt.hide();
              btnEditOptt.hide();
              btnDeleteOptt.show();
            }
        }
        else
        {
          btnAddOptt.show();
          btnEditOptt.hide();
          btnDeleteOptt.hide();
        }
    });
