lightswitch05 / table-to-json

Serializes HTML tables into JSON objects.
http://lightswitch05.github.io/table-to-json/
MIT License
756 stars 172 forks source link

Null Value is returned if the table is hidden #17

Closed invincible1388 closed 9 years ago

invincible1388 commented 9 years ago

If the table is hidden by "display:none" property then the json value returned is null.

lightswitch05 commented 9 years ago

Table To JSON has an option called ignoreHiddenRows which defaults to true. If you want to read a hidden table, then you need to turn this feature off:

var table = $('#example-table').tableToJSON({ignoreHiddenRows: false});

Here is an example of it working with a hidden table: http://plnkr.co/edit/p5lgP90gaoFt2qAcMCIb?p=preview

Please read all the options Table To JSON supports here: http://lightswitch05.github.io/table-to-json/