Markdown code block

Markdown code block

dtimpermandtimperman Posts: 6Questions: 2Answers: 1
edited June 2014 in Free community support

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:

Answers

  • allanallan Posts: 57,730Questions: 1Answers: 9,203 Site admin
    Answer ✓

    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

  • allanallan Posts: 57,730Questions: 1Answers: 9,203 Site admin
    edited June 2014 Answer ✓

    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

  • dtimpermandtimperman Posts: 6Questions: 2Answers: 1

    Thank you!

This discussion has been closed.