diff --git a/js/widgets/widget-columnSelector.js b/js/widgets/widget-columnSelector.js index 720b820e..6b4962f8 100644 --- a/js/widgets/widget-columnSelector.js +++ b/js/widgets/widget-columnSelector.js @@ -256,8 +256,8 @@ tsColSel = ts.columnSelector = { $popup.find('.tablesorter-column-selector') .html( colSel.$container.html() ) .find('input').each(function(){ - var isChecked = indx === 'auto' ? colSel.auto : colSel.states[indx], - indx = $(this).toggleClass( wo.columnSelector_cssChecked, isChecked ).attr('data-column'); + var indx = $(this).toggleClass( wo.columnSelector_cssChecked, isChecked ).attr('data-column'), + isChecked = indx === 'auto' ? colSel.auto : colSel.states[indx]; $(this).prop( 'checked', isChecked ); }); colSel.$popup = $popup.on('change', 'input', function(){