php - unable to display data from Javascript sourced data in datatable -


i have been trying display javascript sourced data in datatable. not work. tried link. did is:

js:

var dataset = [     ['trident','internet explorer 4.0','win 95+','4','x'],     ['trident','internet explorer 5.0','win 95+','5','c'],     ['trident','internet explorer 5.5','win 95+','5.5','a'],     ['trident','internet explorer 6','win 98+','6','a'],     ['trident','internet explorer 7','win xp sp2+','7','a'], ]  $(document).ready(function() {     $('#demo').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>' );      $('#example').datatable( {         "data": dataset,         "columns": [             { "title": "engine" },             { "title": "browser" },             { "title": "platform" },             { "title": "version", "class": "center" },             { "title": "grade", "class": "center" }         ]     } ); } ); 

in html section, did not find in link. have checked in several variation data not being displayed. i.e. added table in html or <div id="demo"></demo>

nb: have added script @ bottom section of body. other example works except is, displaying js data.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -