Sha256: 20230048f96caade30fcc8178f0a2d45fe723d0163cb23978f8757d603fef42f
Contents?: true
Size: 1.07 KB
Versions: 24
Compression:
Stored size: 1.07 KB
Contents
I">(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).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