1

I am trying to add a check box to a single column jQuery data table using

dataTable.fnAddData( ["<input type=\"checkbox\">"]);

I don't get any error messages but nothing shows up.

OtagoHarbour
  • 3,739
  • 6
  • 42
  • 78

2 Answers2

1

I needed to do

dataTable.fnAddData( ["<input type='checkbox' id='checkboxID'/>"]);
jQuery('#checkBoxID').show();
OtagoHarbour
  • 3,739
  • 6
  • 42
  • 78
0

You need to add \ before escape character.

dataTable.fnAddData( ["<input type=\\"checkbox\\">"]);

Check this SO Question.

Community
  • 1
  • 1
Praveen
  • 53,079
  • 32
  • 129
  • 156