DEV Community


jQuery dataTable properties.

sharan profile image Sharan ・1 min read

I am using a dataTable which I've initiated with,

var datatable = $('#datatble').DataTable({
    ... (Some stuff around there)
    oLanguage: {
        sSearch: '_INPUT_'
        lengthMenu: '_MENU_',
    language: {},
    sDom: '',
Enter fullscreen mode Exit fullscreen mode

My question is why there is a prefix for properties like sDom, oLanguage, sSearch?

Without language: {}, the lengthMenu property did not work. Without the prefix, that corresponding property didn't work.

Please explain me, why is this happening?
What are those prefix are meant?


Editor guide
larrydanny profile image

prefix stand for dataType. Such as s => string, o => object, i => int etc..