where do I put directives like scrolly?

where do I put directives like scrolly?

Sasori7Sasori7 Posts: 26Questions: 10Answers: 0

I'm just completely confused. I've looked at the examples, but they all just cover the subject, not where it exists with data and columns.
I'm trying to add scrolly. But, when I attempted to put it after data and columns, nothing rendered.
Then when I tried to place it on it's own, like in it's example, I get:
DataTables warning: table id=example - Cannot reinitialise DataTable.

I have this:
_ $('#example').DataTable( {
data: myList,
columns: MyCols
} );
_
where do I put "scrollY": "200px"?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,261Questions: 26Answers: 4,934
    Answer ✓

    Combine all the initialization options in one object, like this:

    $('#example').DataTable( {
      data: myList,
      columns: MyCols,
      "scrollY": "200px"
    } );
    

    Kevin

  • Sasori7Sasori7 Posts: 26Questions: 10Answers: 0

    well, now I just feel stupid.
    But, thanks!

Sign In or Register to comment.