toggle striping class instead of add/remove

This commit is contained in:
narcolepticinsomniac 2018-08-24 21:36:47 -04:00 committed by GitHub
parent bf732f7bd0
commit 743a1b6812
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,11 +285,7 @@ function showStyles(styles) {
});
var reverseZebra = $('.entry:last-child:nth-of-type(odd)') !== null;
if (reverseZebra) {
$('#installed').classList.add('reverse-stripe');
} else {
$('#installed').classList.remove('reverse-stripe');
}
$('#installed').classList.toggle('reverse-stripe', reverseZebra);
}
@ -539,11 +535,7 @@ function handleDelete(id) {
}
var reverseZebra = $('.entry:last-child:nth-of-type(odd)') !== null;
if (reverseZebra) {
$('#installed').classList.add('reverse-stripe');
} else {
$('#installed').classList.remove('reverse-stripe');
}
$('#installed').classList.toggle('reverse-stripe', reverseZebra);
}