move checkboxes to the left of the showVideo view

This commit is contained in:
Michael Q Larson
2015-04-18 15:00:31 -07:00
parent aacfb86e1f
commit b671ab9817
4 changed files with 26 additions and 20 deletions

View File

@@ -39,19 +39,19 @@ $(document).ready(function() {
});
$('.step-text').on('click', function() {
$(this).siblings().children('input').trigger('click');
$(this).parent().parent().parent().children().children('input').trigger('click');
});
$('.challenge-list-checkbox').on('change', function() {
var checkboxId = $(this).parent().parent().attr('id');
if ($(this).is(":checked")) {
$(this).parent().parent().children('.step-text').addClass('faded');
$(this).parent().siblings().children().addClass('faded');
if (!localStorage || !localStorage[checkboxId]) {
localStorage[checkboxId] = true;
}
}
if (!$(this).is(":checked")) {
$(this).parent().parent().children('.step-text').removeClass('faded');
$(this).parent().siblings().children().removeClass('faded');
if (localStorage[checkboxId]) {
localStorage.removeItem(checkboxId);
}