1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-29 11:24:10 +01: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:
Allan Jardine 2012-09-02 09:48:45 +01:00
parent 9c82abe79d
commit 93b0c9ede7

View File

@ -2698,7 +2698,7 @@ var dtLinks = [
/* Show and syntax highlight XHR returns from the server */
$(document).ready( function () {
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');
if ( n ) {
n.innerHTML = JSON.stringify( json, null, 2 );