-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: $(...).DataTable is not a function #214
Comments
Could you paste content of your |
This is my application.js file
|
Any fix? I'm having the same issue |
@stilney @MichaelDorkhom It seems to be ok. I have similar configuration and it is working properly. Can you please check jquery console and see if there is any error before this or can you push sample application to reproduce this error? |
I am also facing the same Issue while calling dataTable(). Also, I have checked properly that Jquery is loaded priorily. The error is -> Uncaught TypeError: $(...).dataTable is not a function(…) @stilney Were you able to find a workaround for this ? |
I solved it. The Issue was jQuery was being initialised twice. Once before requiring the datatable and once after it was initialised and all set to work. So it was something like this. //= require jquery And in the javascript directory, somehow an extra jquery.min.js file was there. So when //= require tree . was executed, Jquery was reinitialized once more and lost all the references to datatables. Hope this may be useful for someone. |
jquery.min.js:2 jQuery.Deferred exception: .DataTable is not a function TypeError: $(...).DataTable is not a function admin lte 3 datatable not working for me... any one pls help me |
I get the following error in the console when I try to use DataTables
I ran the following code to setup dataTables
gem 'jquery-datatables-rails', '~> 3.3.0'
bundle install
$ rails generate jquery:datatables:install
$ rails generate jquery:datatables:install bootstrap3
$ rails generate jquery:datatables:install responsive
I restarted the rails server, and added this code.
The text was updated successfully, but these errors were encountered: