mirror of
https://github.com/DataTables/DataTables.git
synced 2025-04-08 00:54:11 +02:00
Examples: update - bind the 'xhr' event to the table without calling DataTables - no need for that call to be made.
This commit is contained in:
parent
9c82abe79d
commit
93b0c9ede7
@ -2698,7 +2698,7 @@ var dtLinks = [
|
|||||||
/* Show and syntax highlight XHR returns from the server */
|
/* Show and syntax highlight XHR returns from the server */
|
||||||
$(document).ready( function () {
|
$(document).ready( function () {
|
||||||
if ( $.fn.dataTableSettings.length >= 1 ) {
|
if ( $.fn.dataTableSettings.length >= 1 ) {
|
||||||
$('#example').dataTable().bind('xhr', function ( e, oSettings, json ) {
|
$('#example').bind('xhr', function ( e, oSettings, json ) {
|
||||||
var n = document.getElementById('latest_xhr');
|
var n = document.getElementById('latest_xhr');
|
||||||
if ( n ) {
|
if ( n ) {
|
||||||
n.innerHTML = JSON.stringify( json, null, 2 );
|
n.innerHTML = JSON.stringify( json, null, 2 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user