Skip to content

Instantly share code, notes, and snippets.

@philchanet
Created March 21, 2017 13:33
Show Gist options
  • Save philchanet/b635fe279fc631ac3d83f18faa4479a1 to your computer and use it in GitHub Desktop.
Save philchanet/b635fe279fc631ac3d83f18faa4479a1 to your computer and use it in GitHub Desktop.
Hide TR on bootstrapToggle change + update table stripes on row show/hide
$(function() {
$('#bootstrapToggleID').change(function() {
$('.label-accepted').closest('TR').toggleClass("hidden");
$("tr:not(.hidden)").each(function (index) {
$(this).toggleClass("stripe", !!(index & 1));
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment