Problem with table rows different from html table code

Problem with table rows different from html table code

nic3108nic3108 Posts: 8Questions: 2Answers: 0

Hi, I had some help from a programmer to set this responsive table up. I didn't want any 'sort' function on it. Thought it was okay, but the table rows are different layout on web page from the html table code. Any ideas what is wrong?

http://www.kasmill.co.uk/royalyorktest/ryresponstest/roomratestest2.html

Thank you.

This question has an accepted answers - jump to answer

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Answer ✓

    Please do not duplicate posts.

  • nic3108nic3108 Posts: 8Questions: 2Answers: 0

    So sorry, I added paid forum access and thought I had to post in a different forum!

  • allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin

    Hi,

    No worries - thanks for the clarification :-).

    Looking at the code you have:

    $(document).ready( function() {
        $('#main_table').dataTable({
            responsive: true,
              paging: false,
            /* Disable initial sort */
            "aaSorting": []
        });
    })
    

    which is fine, but if you want to disable the user's ability to sort the table entirely you need to add the ordering option:

    $(document).ready( function() {
        $('#main_table').dataTable({
            responsive: true,
              paging: false,
              ordering: false
        });
    })
    

    I've removed the aaSorting option since that is redundant if sorting is disabled!

    Allan

  • nic3108nic3108 Posts: 8Questions: 2Answers: 0

    That's great! Thank you for your help.

This discussion has been closed.