I am trying to avoid having to write the optinos array for each call to the plugin and I was wondering how can create one only shared options array to avoid this.
This could be applied to this call, for example:
$(document).ready( function() {
$('#example').dataTable( {
"oLanguage": {
"oPaginate": {
"sNext": ">"
}
}
} );
} );
I have tried something like this but it doesn’t work:
$.dataTable.defaults = {
"oLanguage": {
"oPaginate": {
"sNext": ">"
}
}
}
You can find more about the options array Im trying to modify in here:
http://datatables.net/usage/i18n
Just create the object first, and you can pass it in at anytime you call the plugin.
And when ready to call the plugin, use it like this: