DEV Community

Sharan
Sharan

Posted on

jQuery dataTable properties.

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?

Top comments (1)

Collapse
 
larrydanny profile image
Larry

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