Skip to content

Instantly share code, notes, and snippets.

@ridhotegar
Last active December 23, 2021 05:05
Show Gist options
  • Save ridhotegar/e643fe2754a989704da889511f49b55f to your computer and use it in GitHub Desktop.
Save ridhotegar/e643fe2754a989704da889511f49b55f to your computer and use it in GitHub Desktop.
Sample constructor function Data table JQuery
$(document).ready(function() {
$.fn.setDt = function(){
this.dataTable({
"paging" : true,
"ordering" : false,
"info" : true,
"searching" : true
})
}
});
$('selector').setDt()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment