Markdown code block
Markdown code block
 dtimperman            
            
                Posts: 6Questions: 2Answers: 1
dtimperman            
            
                Posts: 6Questions: 2Answers: 1            
            How the H can I properly post a code block?
$('.toggle-vis').each(function(i, obj) {
        //get column API object(attribute 'data-column' contains index of column)
        var column = oTable.column($(this).attr('data-column'));
        if (column.visible()) {
            $(this).removeClass('hidden');
        } else {
            $(this).addClass('hidden');
        }
    });
    //on click of 'toggle-vis' classes handle column visibility
    $('.toggle-vis').on('click', function(e) {
        //get column API object(attribute 'data-column' contains index of column)
        var column = oTable.column($(this).attr('data-column'));
        if (column.visible()) {
            column.visible(false);
            $(this).addClass('hidden');
        } else {
            column.visible(true);
            $(this).removeClass('hidden');
        }
    });
edited by Allan
This question has accepted answers - jump to:
This discussion has been closed.
            
Answers
What you had was very close! Just include an empty newline before the
\``` and don't have whitespace at the start of the line (there was a space).Allan
What you had was very close! Just include an empty newline before the three ``` characters and don't have whitespace at that start of the line (there was a space).
Allan
Thank you!