i am using a data table to show user data but it says jQuery.Deferred exception: $(...).DataTable is
i am using a data table to show user data but it says jQuery.Deferred exception: $(...).DataTable is
$(document).ready(function () {
var oTable = $('#myDatatable').DataTable({
"ajax": {
"url": '/home/Getuser',
"type": "get",
"datatype":"json"
},
"columns": [
{ "data": "name", "autowidth": true },
{ "data": "emailID", "autowidth": true },
{ "data": "mobileNo", "autowidth": true },
{ "data": "fullName", "autowidth": true },
]
})
// $('#myDatatable').HTML();
})
Answers
i am new to asp.mvc 4 any one can help mi to sort out this
I'm not familiar with your environment and not able to see the full message but it sounds like the message is saying datatables is not a function. Is this correct?
If so it sounds like the datatables JS includes aren't being loaded.
Kevin
Or jQuery is being loaded multiple times. jQuery will overwrite itself if that is done, taking any old plug-ins with it. Load jQuery only once.
Allan