Error in datatable plugin

Error in datatable plugin

onlyamitjainonlyamitjain Posts: 1Questions: 1Answers: 0

Hello,

I am trying to use this tool for pagination but it's not working for me.

Enviorment :
Server side : Node Js
Client : Jquery, ejs

<link rel="stylesheet" type="text/css" href="/linker/styles/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="/linker/styles/shCore.css">
<link rel="stylesheet" type="text/css" href="/linker/styles/demo.css">
<style type="text/css" class="init">

</style>
<script type="text/javascript" language="javascript" src="/linker/js/demo.js"></script>
<script type="text/javascript" language="javascript" src="/linker/js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="/linker/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="/linker/js/shCore.js"></script>

$(document).ready(function() {
$('#MyTableId').dataTable();
} );

<

table id="example" class="display" cellspacing="0" width="100%">

Structure My project
myproject
api
assets
Linker
js
All required js file
styles
All required CSS file

 views
    Layout.ejs

Question :

When we link this java script and CSS files in layout.ejs .. it did not worked for me.
Giving the exception like "undefined type error" when $(document).ready(function() called.

Interesting thing when i created the sample standalone program.. it worked me.

Can someone please tell me what would be causing it when i put this code in layout.ejs?

Any ideas will be helpful..

Thanks in advance...

This discussion has been closed.