javaScript runtime error: Object doesn't support property or method 'dataTable'

javaScript runtime error: Object doesn't support property or method 'dataTable'

TanujaTanuja Posts: 2Questions: 1Answers: 0

I am getting Object doesn't support property or method 'dataTable' when trying to use jquery table using " $('#table_id').DataTable();" code. Please help.

Answers

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    Are you loading jQuery more than once?

    Kevin

  • TanujaTanuja Posts: 2Questions: 1Answers: 0

    Could you please share me a working example of using jquery datatable in asp.net.

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin

    The fact that you are using ASP.NET should be irrelevant. DataTables is a client-side library.

    The answer is very likely what Kevin stated above - jQuery is being loaded multiple times. If you attach DataTables to the first jQuery and then load jQuery again, it will overwrite the first.

    Without a link to a test case showing the issue (as required in the forum rules) we can't really any more help than that.

    Allan

This discussion has been closed.