Sha256: f898dbb66cc0b89e76a7826ec1a352f359c3c2bac7dfa50d06dbf1237352b1f9
Contents?: true
Size: 1.02 KB
Versions: 11
Compression:
Stored size: 1.02 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
11 entries across 11 versions & 1 rubygems