Last active
August 29, 2015 14:22
-
-
Save ryun/284e8f1321a22a56f2aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var customFilterData = {}; | |
$('#data-table') | |
.on('preXhr.dt', function ( e, settings, d ) | |
{ | |
d.page = Math.ceil(d.start / d.length) + 1; | |
if ( d.page <= 1 ) d.page = 1; | |
for (var i in customFilterData) | |
{ | |
d[i] = customFilterData[i]; | |
} | |
} | |
) | |
$('.example-filter-button').on('click', function(e){ | |
// Serialize fields | |
// Set them to customFilterData | |
// Trigger data tables filter request | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment