Issue using 1.10 table rows()

Issue using 1.10 table rows()

jlag833jlag833 Posts: 2Questions: 0Answers: 0
edited April 2014 in DataTables 1.10
I've encountered an issue when attempting to follow the example for multi-row selections:

https://next.datatables.net/examples/api/select_row.html

The issue is, when I try to recreate the example and click the button nothing happens. The console shows the following error:

[code]Uncaught TypeError: Object [object Object] has no method 'rows'[/code]

I've checked and made sure I'm not loading multiple instances of jQuery or datatables JS files. See the jsfiddle at:

http://jsfiddle.net/8HPh4/14/

Is this possibly a bug, or have I botched something here? I've tried using jQuery 1.10.2, 1.11.0, but encountered the same issue.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    You aren't using the DataTables API instance. You have:

    > var table = $('#cardlist').dataTable( {

    You want:

    [code]
    var table = $('#cardlist').DataTable( {
    [/code]

    See: http://next.datatables.net/manual/api#Accessing-the-API

    Allan
  • jlag833jlag833 Posts: 2Questions: 0Answers: 0
    /facepalm

    Thanks Allan, that was exactly it.
This discussion has been closed.