Sha256: a62c507a68ce464ec403baff32991f422fcb5628e26ca7518980be1d8b579639
Contents?: true
Size: 1.03 KB
Versions: 19
Compression:
Stored size: 1.03 KB
Contents
$(function() { $('#filter').on('keyup', function() { $input = $(this); if ($input.val() === '') { $('div.experiment').show(); return false; } $('div.experiment').hide(); selector = 'div.experiment[data-name*="' + $input.val() + '"]'; $(selector).show(); }); $('#clear-filter').on('click', function() { $('#filter').val(''); $('div.experiment').show(); $('#toggle-active').val('Hide active'); $('#toggle-completed').val('Hide completed'); }); $('#toggle-active').on('click', function() { $button = $(this); if ($button.val() === 'Hide active') { $button.val('Show active'); } else { $button.val('Hide active'); } $('div.experiment[data-complete="false"]').toggle(); }); $('#toggle-completed').on('click', function() { $button = $(this); if ($button.val() === 'Hide completed') { $button.val('Show completed'); } else { $button.val('Hide completed'); } $('div.experiment[data-complete="true"]').toggle(); }); });
Version data entries
19 entries across 19 versions & 2 rubygems