Skip to content

Instantly share code, notes, and snippets.

@barakargaman
barakargaman / gist:7847640
Last active December 30, 2015 15:19
filter rows on mode checkbox change
var modes = ['free_submission_free_day',
'paid_submission_free_day',
'free_submission_bargain_day',
'paid_submission_bargain_day'
];
$('input[type="checkbox"]').on('change', function() {
var modes_code = _.map(modes, function(i){ ($('.'+i).val()) ? '1' : '.' }).join();
var rex = new RegExp(modes_code, 'i');
$('.searchable tr').hide();
$('.searchable tr').filter(function() {
function A() {
this.aParam = 'a sababa',
this.aFunction = function() { return this.aParam; }
};
function B() {
this.bParam = 'b sababa',
this.bFunction = function() { return this.bParam; }
};
function C() {