Sha256: e36601948c11e82151077a7793dde0aae2d94a4a73245c43d9fcb4bc15e7ed15
Contents?: true
Size: 1.08 KB
Versions: 24
Compression:
Stored size: 1.08 KB
Contents
I"C(function() { $(function() { return $("[data-select-columns]").each(function() { return $(this).on('change', function() { var headers, options, table, table_selector; table_selector = $(this).data('select-columns-target'); table = $(table_selector); headers = $(table_selector + " th"); options = $(this).find("option"); console.log(options); return options.each(function() { var column_index, th_id; th_id = $(this).attr('value'); column_index = $(table_selector + " tbody tr:first th").index(th_id) + 1; console.log(column_index); if ($(this).is(':selected')) { $(table_selector + " th:nth-child(" + column_index + ")").show(); return $(table_selector + " td:nth-child(" + column_index + ")").show(); } else { $(table_selector + " th:nth-child(" + column_index + ")").hide(); return $(table_selector + " td:nth-child(" + column_index + ")").hide(); } }); }); }); }); }).call(this); :ET
Version data entries
24 entries across 24 versions & 1 rubygems