1
2
3
4
5
6 $(document).ready( function (){
7 $('selector').dataTable( {
8
9
10
11
12 "bAutoWidth":true,
13
14
15
16
17
18 "bDeferRender":false,
19
20
21
22
23
24
25 "bFilter":true,
26
27
28
29
30 "bInfo":true,
31
32
33
34
35 "bJQueryUI":false,
36
37
38
39
40 "bLengthChange":false,
41
42
43
44
45 "bPaginage":true,
46
47
48
49
50
51 "bProcessing":false,
52
53
54
55
56
57 "bScrollInfinite":false,
58
59
60
61
62 "bServerSide":false,
63
64
65
66
67 "bSort":true,
68
69
70
71
72
73
74 "bSortClasses":true,
75
76
77
78
79
80 "bStateSave":false,
81
82
83
84
85
86 "sScrollX":"100%",
87
88
89
90
91
92 "sScrollY":"100%",
93
94
95
96 "oLanguage":{
97 "oAria":{
98
99
100
101
102 "sSortAscending": " - click/return to sort ascending",
103
104
105
106
107 "sSortDescending": " - click/return to sort descending"
108 },
109 "oPaginate": {
110
111
112
113
114 "sFirst": "First page",
115
116
117
118
119 "sLast": "Last page",
120
121
122
123
124 "sNext": "Next page",
125
126
127
128
129 "sPrevious": "Previous page"
130 },
131
132
133
134
135
136 "sEmptyTable": "No data available in table",
137
138
139
140
141 "sInfo": "Got a total of _TOTAL_ entries to show (_START_ to _END_)",
142
143
144
145
146 "sInfoEmpty": "No entries to show",
147
148
149
150
151 "sInfoFiltered": " - filtering from _MAX_ records",
152
153
154
155
156
157 "sInfoPostFix": "All records shown are derived from real information.",
158
159
160
161
162
163 "sInfoThousands": "'",
164
165
166
167
168
169 "sLengthMenu": "Display _MENU_ records",
170
171
172
173
174
175 "sLoadingRecords": "Please wait - loading...",
176
177
178
179
180 "sProcessing": "DataTables is currently busy",
181
182
183
184
185
186
187 "sSearch": "Apply filter _INPUT_ to table",
188
189
190
191
192
193
194 "sUrl": "http://www.sprymedia.co.uk/dataTables/lang.txt",
195
196
197
198
199
200 "sZeroRecords": "No records to display"
201 }
202 });
203 });
204
205
206
207
208
209
210
211
212 $('selector').dataTable({
213 "bFilter": false,
214 "bDestroy": true
215 });
216
217
218
219
220
221
222
223
224 $(document).ready(function(){
225 initTable();
226 tableActions();
227 });
228
229 function initTable()
230 {
231 return $('#example').dataTable( {
232 "sScrollY": "200px",
233 "bPaginate": false,
234 "bRetrieve": true
235 });
236 }
237
238 function tableActions()
239 {
240 var oTable = initTable();
241
242 }
243
244
245
246
247
248
249 $(document).ready(function(){
250 $('#example').dataTable( {
251 "bScrollAutoCss": false,
252 "sScrollY": "200px"
253 });
254 });
255
256
257
258
259
260
261
262
263 $(document).ready(function(){
264 $('#example').dataTable( {
265 "sScrollY": "200",
266 "bScrollCollapse": true
267 });
268 });
269
270
271
272
273
274
275 $(document).ready(function(){
276 $('#example').dataTable( {
277 "bSortCellsTop": true
278 });
279 });
280
281
282
283
284
285
286 $(document).ready(function(){
287 $('#example').dataTable( {
288 "iCookieDuration": 60*60*24
289 });
290 })
291
292
293
294
295
296
297
298
299 $(document).ready(function(){
300 $('#example').dataTable( {
301 "bServerSide": true,
302 "sAjaxSource": "scripts/server_processing.php",
303 "iDeferLoading": 57
304 });
305 });
306
307
308
309
310
311
312 $(document).ready(function(){
313 $('#example').dataTable( {
314 "bServerSide": true,
315 "sAjaxSource": "scripts/server_processing.php",
316 "iDeferLoading": 57
317 });
318 });
319
320
321
322
323
324
325
326 $(document).ready(function(){
327 $('#example').dataTable( {
328 "iDisplayStart": 20
329 });
330 })
331
332
333
334
335
336
337
338 $(document).ready(function(){
339 $('#example').dataTable( {
340 "bScrollInfinite": true,
341 "bScrollCollapse": true,
342 "sScrollY": "200px",
343 "iScrollLoadGap": 50
344 });
345 });
346
347
348
349
350
351
352
353
354 $(document).ready(function(){
355 $('#example').dataTable( {
356 "iTabIndex": 1
357 });
358 });
359
360
361
362
363
364
365
366
367 $(document).ready(function(){
368 $('#example').dataTable( {
369 "oSearch": {"sSearch": "Initial search"}
370 });
371 })
372
373
374
375
376
377
378
379
380 $(document).ready(function(){
381 var oTable = $('#example').dataTable( {
382 "sAjaxSource": "sources/data.txt",
383 "sAjaxDataProp": "data"
384 });
385 });
386
387
388 $(document).ready(function(){
389 var oTable = $('#example').dataTable( {
390 "sAjaxSource": "sources/data.txt",
391 "sAjaxDataProp": "data.inner"
392 });
393 });
394
395
396
397
398
399
400
401 $(document).ready(function(){
402 $('#example').dataTable( {
403 "sAjaxSource": "http://www.sprymedia.co.uk/dataTables/json.php"
404 });
405 })
406
407
408
409
410
411
412 $(document).ready(function(){
413 $('#example').dataTable( {
414 "sCookiePrefix": "my_datatable_",
415 });
416 });
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441 $(document).ready(function(){
442 $('#example').dataTable( {
443 "sDom": '<"top"i>rt<"bottom"flp><"clear"&lgt;'
444 });
445 });
446
447
448
449
450
451
452
453 $(document).ready(function(){
454 $('#example').dataTable( {
455 "sPaginationType": "full_numbers"
456 });
457 })
458
459
460
461
462
463
464
465
466 $(document).ready(function(){
467 $('#example').dataTable( {
468 "sScrollX": "100%",
469 "sScrollXInner": "110%"
470 });
471 });
472
473
474
475
476
477
478 $(document).ready(function(){
479 $('#example').dataTable({
480 "bServerSide": true,
481 "sAjaxSource": "scripts/post.php",
482 "sServerMethod": "POST"
483 });
484 });
485
486
487
488
489
490
491
492 $(document).ready(function (){
493 $('#example').dataTable({
494 "fnCookieCallback": function (sName, oData, sExpires, sPath) {
495
496 return sName + "="+JSON.stringify(oData)+"; expires=" + sExpires +"; path=" + sPath;
497 }
498 });
499 });
500
501
502
503
504
505
506
507 $(document).ready(function(){
508 $('#example').dataTable({
509 "fnCreatedRow": function( nRow, aData, iDataIndex ){
510
511 if ( aData[4] == "A" )
512 {
513 $('td:eq(4)', nRow).html( '<b>A</b>' );
514 }
515 }
516 });
517 });
518
519
520
521
522
523
524 $(document).ready( function(){
525 $('#example').dataTable({
526 "fnDrawCallback": function(){
527 alert( 'DataTables has redrawn the table' );
528 }
529 });
530 });
531
532
533
534
535
536
537 $(document).ready( function(){
538 $('#example').dataTable({
539 "fnDrawCallback": function() {
540 alert( 'DataTables has redrawn the table' );
541 }
542 });
543 });
544
545
546
547
548
549
550
551
552 $(document).ready(function(){
553 $('#example').dataTable({
554 "fnFormatNumber": function ( iIn ) {
555 if ( iIn < 1000 ) {
556 return iIn;
557 } else {
558 var
559 s=(iIn+""),
560 a=s.split(""), out="",
561 iLen=s.length;
562
563 for ( var i=0 ; i<iLen ; i++ ) {
564 if ( i%3 === 0 && i !== 0 ) {
565 out = "'"+out;
566 }
567 out = a[iLen-i-1]+out;
568 }
569 }
570 return out;
571 };
572 });
573 });
574
575
576
577
578
579
580 $(document).ready(function(){
581 $('#example').dataTable({
582 "fnFormatNumber": function ( iIn ) {
583 if ( iIn < 1000 ) {
584 return iIn;
585 } else {
586 var
587 s=(iIn+""),
588 a=s.split(""), out="",
589 iLen=s.length;
590
591 for ( var i=0 ; i<iLen ; i++ ) {
592 if ( i%3 === 0 && i !== 0 ) {
593 out = "'"+out;
594 }
595 out = a[iLen-i-1]+out;
596 }
597 }
598 return out;
599 };
600 });
601 });
602
603
604
605
606
607
608
609 $('#example').dataTable( {
610 "fnInfoCallback": function( oSettings, iStart, iEnd, iMax, iTotal, sPre ) {
611 return iStart +" to "+ iEnd;
612 }
613 });
614
615
616
617
618
619
620
621 $(document).ready( function(){
622 $('#example').dataTable({
623 "fnInitComplete": function(oSettings, json) {
624 alert( 'DataTables has finished its initialisation.' );
625 }
626 });
627 })
628
629
630
631
632
633
634
635 $(document).ready( function(){
636 $('#example').dataTable({
637 "fnPreDrawCallback": function( oSettings ) {
638 if ( $('#test').val() == 1 ) {
639 return false;
640 }
641 }
642 });
643 });
644
645
646
647
648
649
650
651 $(document).ready(function(){
652 $('#example').dataTable({
653 "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
654
655 if ( aData[4] == "A" )
656 {
657 $('td:eq(4)', nRow).html( '<b>A</b>' );
658 }
659 }
660 });
661 });
662
663
664
665
666
667
668
669
670 $(document).ready(function(){
671 $('#example').dataTable( {
672 "bProcessing": true,
673 "bServerSide": true,
674 "sAjaxSource": "xhr.php",
675 "fnServerData": function ( sSource, aoData, fnCallback ) {
676 $.ajax( {
677 "dataType": 'json',
678 "type": "POST",
679 "url": sSource,
680 "data": aoData,
681 "success": fnCallback
682 } );
683 }
684 });
685 });
686
687
688
689
690
691
692
693 $(document).ready(function(){
694 $('#example').dataTable( {
695 "bProcessing": true,
696 "bServerSide": true,
697 "sAjaxSource": "scripts/server_processing.php",
698 "fnServerParams": function ( aoData ) {
699 aoData.push( { "name": "more_data", "value": "my_value" } );
700 }
701 });
702 });
703
704
705
706
707
708
709
710 $(document).ready(function(){
711 $('#example').dataTable({
712 "bStateSave": true,
713 "fnStateSave": function (oSettings, oData) {
714 var o;
715
716
717
718 $.ajax( {
719 "url": "/state_load",
720 "async": false,
721 "dataType": "json",
722 "success": function (json) {
723 o = json;
724 }
725 } );
726 return o;
727 }
728 });
729 });
730
731
732
733
734
735
736
737
738
739 $(document).ready(function(){
740 $('#example').dataTable({
741 "bStateSave": true,
742 "fnStateLoadParams": function (oSettings, oData) {
743 oData.oFilter.sSearch = "";
744 });
745 });
746
747
748
749 $(document).ready(function(){
750 $('#example').dataTable({
751 "bStateSave": true,
752 "fnStateLoadParams": function (oSettings, oData) {
753 return false;
754 });
755 });
756
757
758
759
760
761
762
763 $(document).ready(function(){
764 $('#example').dataTable({
765 "bStateSave": true,
766 "fnStateLoaded": function (oSettings, oData) {
767 alert( 'Saved filter was: '+oData.oFilter.sSearch );
768 });
769 });
770
771
772
773
774
775
776
777 $(document).ready(function(){
778 $('#example').dataTable({
779 "bStateSave": true,
780 "fnStateSave": function (oSettings, oData) {
781
782 $.ajax( {
783 "url": "/state_save",
784 "data": oData,
785 "dataType": "json",
786 "method": "POST"
787 "success": function () {}
788 });
789 }
790 });
791 });
792
793
794
795
796
797
798
799
800 $(document).ready(function(){
801 $('#example').dataTable({
802 "bStateSave": true,
803 "fnStateLoadParams": function (oSettings, oData) {
804 oData.oFilter.sSearch = "";
805 });
806 });
807
808
809
810
811
812
813
814 $(document).ready(function(){
815 $('#example').dataTable({
816 "aoColumnDefs": [
817 { "aDataSort": [ 0, 1 ], "aTargets": [ 0 ] },
818 { "aDataSort": [ 1, 0 ], "aTargets": [ 1 ] },
819 { "aDataSort": [ 2, 3, 4 ], "aTargets": [ 2 ] }
820 ]
821 });
822 });
823
824
825
826 $(document).ready(function(){
827 $('#example').dataTable({
828 "aoColumns": [
829 { "aDataSort": [ 0, 1 ] },
830 { "aDataSort": [ 1, 0 ] },
831 { "aDataSort": [ 2, 3, 4 ] },
832 null,
833 null
834 ]
835 });
836 });
837
838
839
840
841
842
843
844 $(document).ready(function(){
845 $('#example').dataTable({
846 "aoColumnDefs": [
847 { "asSorting": [ "asc" ], "aTargets": [ 1 ] },
848 { "asSorting": [ "desc", "asc", "asc" ], "aTargets": [ 2 ] },
849 { "asSorting": [ "desc" ], "aTargets": [ 3 ] }
850 ]
851 });
852 });
853
854
855
856 $(document).ready(function(){
857 $('#example').dataTable( {
858 "aoColumns": [
859 null,
860 { "asSorting": [ "asc" ] },
861 { "asSorting": [ "desc", "asc", "asc" ] },
862 { "asSorting": [ "desc" ] },
863 null
864 ]
865 });
866 });
867
868
869
870
871
872
873
874 $(document).ready(function(){
875 $('#example').dataTable({
876 "aoColumnDefs": [
877 { "bSearchable": false, "aTargets": [ 0 ] }
878 ]} );
879 });
880
881
882
883 $(document).ready(function(){
884 $('#example').dataTable({
885 "aoColumns": [
886 { "bSearchable": false },
887 null,
888 null,
889 null,
890 null
891 ] });
892 });
893
894
895
896
897
898
899
900 $(document).ready(function(){
901 $('#example').dataTable({
902 "aoColumnDefs": [
903 { "bSortable": false, "aTargets": [ 0 ] }
904 ] });
905 });
906
907
908
909 $(document).ready(function(){
910 $('#example').dataTable( {
911 "aoColumns": [
912 { "bSortable": false },
913 null,
914 null,
915 null,
916 null
917 ] });
918 });
919
920
921
922
923
924
925
926
927 $(document).ready(function() {
928 $('#example').dataTable( {
929 "aoColumnDefs": [
930 {
931 "fnRender": function ( oObj ) {
932 return oObj.aData[0] +' '+ oObj.aData[3];
933 },
934 "bUseRendered": false,
935 "aTargets": [ 0 ]
936 }
937 ]
938 } );
939 } );
940
941
942 $(document).ready(function() {
943 $('#example').dataTable( {
944 "aoColumns": [
945 {
946 "fnRender": function ( oObj ) {
947 return oObj.aData[0] +' '+ oObj.aData[3];
948 },
949 "bUseRendered": false
950 },
951 null,
952 null,
953 null,
954 null
955 ]
956 } );
957 } );
958
959
960
961
962
963
964
965 $(document).ready(function() {
966 $('#example').dataTable( {
967 "aoColumnDefs": [
968 { "bVisible": false, "aTargets": [ 0 ] }
969 ] } );
970 } );
971
972
973
974 $(document).ready(function() {
975 $('#example').dataTable( {
976 "aoColumns": [
977 { "bVisible": false },
978 null,
979 null,
980 null,
981 null
982 ] } );
983 } );
984
985
986
987
988
989
990
991 $(document).ready(function() {
992 $('#example').dataTable( {
993 "aoColumnDefs": [ {
994 "aTargets": [3],
995 "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
996 if ( sData == "1.7" ) {
997 $(nTd).css('color', 'blue')
998 }
999 }
1000 } ]
1001 });
1002 } );
1003
1004
1005
1006
1007
1008
1009
1010 $(document).ready(function() {
1011 $('#example').dataTable( {
1012 "aoColumnDefs": [
1013 {
1014 "fnRender": function ( o, val ) {
1015 return o.aData[0] +' '+ o.aData[3];
1016 },
1017 "aTargets": [ 0 ]
1018 }
1019 ]
1020 } );
1021 } );
1022
1023
1024
1025 $(document).ready(function() {
1026 $('#example').dataTable( {
1027 "aoColumns": [
1028 { "fnRender": function ( o, val ) {
1029 return o.aData[0] +' '+ o.aData[3];
1030 } },
1031 null,
1032 null,
1033 null,
1034 null
1035 ]
1036 } );
1037 } );
1038
1039
1040
1041
1042
1043
1044
1045 $(document).ready(function() {
1046 $('#example').dataTable( {
1047 "aoColumnDefs": [
1048 { "iDataSort": 1, "aTargets": [ 0 ] }
1049 ]
1050 } );
1051 } );
1052
1053
1054 $(document).ready(function() {
1055 $('#example').dataTable( {
1056 "aoColumns": [
1057 { "iDataSort": 1 },
1058 null,
1059 null,
1060 null,
1061 null
1062 ]
1063 } );
1064 } );
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081 $(document).ready(function() {
1082 var oTable = $('#example').dataTable( {
1083 "sAjaxSource": "sources/deep.txt",
1084 "aoColumns": [
1085 { "mDataProp": "engine" },
1086 { "mDataProp": "browser" },
1087 { "mDataProp": "platform.inner" },
1088 { "mDataProp": "platform.details.0" },
1089 { "mDataProp": "platform.details.1" }
1090 ]
1091 } );
1092 } );
1093
1094
1095
1096
1097 $(document).ready(function() {
1098 var oTable = $('#example').dataTable( {
1099 "aoColumnDefs": [
1100 {
1101 "aTargets": [ 0 ],
1102 "mDataProp": function ( source, type, val ) {
1103 if (type === 'set') {
1104 source.price = val;
1105
1106 source.price_display = val=="" ? "" : "$"+numberFormat(val);
1107 source.price_filter = val=="" ? "" : "$"+numberFormat(val)+" "+val;
1108 return;
1109 }
1110 else if (type === 'display') {
1111 return source.price_display;
1112 }
1113 else if (type === 'filter') {
1114 return source.price_filter;
1115 }
1116
1117 return source.price;
1118 }
1119 ]
1120 } );
1121 } );
1122
1123
1124
1125
1126
1127
1128
1129 $(document).ready(function() {
1130 $('#example').dataTable( {
1131 "aoColumnDefs": [
1132 { "sClass": "my_class", "aTargets": [ 0 ] }
1133 ]
1134 } );
1135 } );
1136
1137
1138 $(document).ready(function() {
1139 $('#example').dataTable( {
1140 "aoColumns": [
1141 { "sClass": "my_class" },
1142 null,
1143 null,
1144 null,
1145 null
1146 ]
1147 } );
1148 } );
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159 $(document).ready(function() {
1160 $('#example').dataTable( {
1161 "aoColumns": [
1162 null,
1163 null,
1164 null,
1165 {
1166 "sContentPadding": "mmm"
1167 }
1168 ]
1169 } );
1170 } );
1171
1172
1173
1174
1175
1176
1177
1178
1179 $(document).ready(function() {
1180 $('#example').dataTable( {
1181 "aoColumnDefs": [
1182 {
1183 "mDataProp": null,
1184 "sDefaultContent": "Edit",
1185 "aTargets": [ -1 ]
1186 }
1187 ]
1188 } );
1189 } );
1190
1191
1192
1193 $(document).ready(function() {
1194 $('#example').dataTable( {
1195 "aoColumns": [
1196 null,
1197 null,
1198 null,
1199 {
1200 "mDataProp": null,
1201 "sDefaultContent": "Edit"
1202 }
1203 ]
1204 } );
1205 } );
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215 $(document).ready(function() {
1216 $('#example').dataTable( {
1217 "aoColumnDefs": [
1218 { "sName": "engine", "aTargets": [ 0 ] },
1219 { "sName": "browser", "aTargets": [ 1 ] },
1220 { "sName": "platform", "aTargets": [ 2 ] },
1221 { "sName": "version", "aTargets": [ 3 ] },
1222 { "sName": "grade", "aTargets": [ 4 ] }
1223 ]
1224 } );
1225 } );
1226
1227
1228
1229 $(document).ready(function() {
1230 $('#example').dataTable( {
1231 "aoColumns": [
1232 { "sName": "engine" },
1233 { "sName": "browser" },
1234 { "sName": "platform" },
1235 { "sName": "version" },
1236 { "sName": "grade" }
1237 ]
1238 } );
1239 } );
1240
1241
1242
1243
1244
1245
1246
1247
1248 $(document).ready(function() {
1249 $('#example').dataTable( {
1250 "aoColumnDefs": [
1251 { "sSortDataType": "dom-text", "aTargets": [ 2, 3 ] },
1252 { "sType": "numeric", "aTargets": [ 3 ] },
1253 { "sSortDataType": "dom-select", "aTargets": [ 4 ] },
1254 { "sSortDataType": "dom-checkbox", "aTargets": [ 5 ] }
1255 ]
1256 } );
1257 } );
1258
1259
1260
1261 $(document).ready(function() {
1262 $('#example').dataTable( {
1263 "aoColumns": [
1264 null,
1265 null,
1266 { "sSortDataType": "dom-text" },
1267 { "sSortDataType": "dom-text", "sType": "numeric" },
1268 { "sSortDataType": "dom-select" },
1269 { "sSortDataType": "dom-checkbox" }
1270 ]
1271 } );
1272 } );
1273
1274
1275
1276
1277
1278
1279
1280 $(document).ready(function() {
1281 $('#example').dataTable( {
1282 "aoColumnDefs": [
1283 { "sTitle": "My column title", "aTargets": [ 0 ] }
1284 ]
1285 } );
1286 } );
1287
1288
1289
1290 $(document).ready(function() {
1291 $('#example').dataTable( {
1292 "aoColumns": [
1293 { "sTitle": "My column title" },
1294 null,
1295 null,
1296 null,
1297 null
1298 ]
1299 } );
1300 } );
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310 $(document).ready(function() {
1311 $('#example').dataTable( {
1312 "aoColumnDefs": [
1313 { "sType": "html", "aTargets": [ 0 ] }
1314 ]
1315 } );
1316 } );
1317
1318
1319
1320 $(document).ready(function() {
1321 $('#example').dataTable( {
1322 "aoColumns": [
1323 { "sType": "html" },
1324 null,
1325 null,
1326 null,
1327 null
1328 ]
1329 } );
1330 } );
1331
1332
1333
1334
1335
1336
1337
1338
1339 $(document).ready(function() {
1340 $('#example').dataTable( {
1341 "aoColumnDefs": [
1342 { "sWidth": "20%", "aTargets": [ 0 ] }
1343 ]
1344 } );
1345 } );
1346
1347
1348
1349 $(document).ready(function() {
1350 $('#example').dataTable( {
1351 "aoColumns": [
1352 { "sWidth": "20%" },
1353 null,
1354 null,
1355 null,
1356 null
1357 ]
1358 } );
1359 } );
1360
1361
1362
1363
1364
1365
1366 $(document).ready( function () {
1367 $('#example').dataTable( {
1368 "bServerSide": true,
1369 "sAjaxSource": "xhr.php"
1370 } );
1371 } );
1372
1373
1374
1375
1376
1377
1378
1379 $(document).ready(function() {
1380 $('#example').dataTable( {
1381 "bProcessing": true,
1382 "bServerSide": true,
1383 "sAjaxSource": "xhr.php",
1384 "fnServerData": function ( sSource, aoData, fnCallback ) {
1385 $.ajax( {
1386 "dataType": 'json',
1387 "type": "POST",
1388 "url": sSource,
1389 "data": aoData,
1390 "success": fnCallback
1391 } );
1392 }
1393 } );
1394 } );
1395
1396
1397
1398
1399
1400
1401 $(document).ready(function() {
1402 $('#example').dataTable( {
1403 "bProcessing": true,
1404 "bServerSide": true,
1405 "sAjaxSource": "scripts/server_processing.php",
1406 "fnServerParams": function ( aoData ) {
1407 aoData.push( { "name": "more_data", "value": "my_value" } );
1408 }
1409 } );
1410 } );
1411
1412
1413
1414
1415
1416
1417
1418 $(document).ready(function() {
1419 var oTable = $('#example').dataTable( {
1420 "sAjaxSource": "sources/data.txt",
1421 "sAjaxDataProp": "data"
1422 } );
1423 } );
1424
1425
1426
1427 $(document).ready(function() {
1428 var oTable = $('#example').dataTable( {
1429 "sAjaxSource": "sources/data.txt",
1430 "sAjaxDataProp": "data.inner"
1431 } );
1432 } );
1433
1434
1435
1436
1437
1438
1439 $(document).ready(function(){
1440 $('#example').dataTable( {
1441 "sAjaxSource": "http://www.sprymedia.co.uk/dataTables/json.php"
1442 });
1443 })
1444
1445
1446
1447
1448
1449 $(document).ready(function(){
1450 $('#example').dataTable({
1451 "bServerSide": true,
1452 "sAjaxSource": "scripts/post.php",
1453 "sServerMethod": "POST"
1454 });
1455 });