Reputation: 12214
I have a controller called "organizations" with views.
I am trying to make a table in one of my views into a jQuery dataTable. I have done this a thousand times before this Coffeescript stuff.
I am running in dev mode, so I have no need to precompile my assets.
My application.js looks like this:
//= require jquery
//= require jquery_ujs
//= require_tree .
And my organizations.js.coffee looks like this:
jQuery ->
$.("#organizations").dataTable()
I am getting a syntax error on the open paren. What is my problem? This should be a simple task.
Thanks for any help you can offer!
Upvotes: 1
Views: 297
Reputation: 12235
I'm not sure what you're trying to achieve here, but shouldn't $.("#organizations")
be $("#organizations")
? (without the dot)
Upvotes: 3