How to call Datatables API functions in Rails CoffeeScript

245 Views Asked by At

I simply wish to call a function called fnGetNodes() to get an array of all nodes. (source of data-tables functions to calls: http://datatables.net/api)

I have set up as:

# DataTable
  table = $("#restaurantLocations").DataTable()

# Selecting all
  $("#selectAllLocations").click ->
    rows = table.fnGetNodes()

Yet as I refresh and click the button Select All I receive the following error on the line table.fnGetNodes():

enter image description here

It should be very easy, but how can I call functions on datatables in CoffeeScript?

0

There are 0 best solutions below