Is it possible to change title "Search: " before searching field?

Is it possible to change title "Search: " before searching field?

trintrintravatrintrintrava Posts: 25Questions: 1Answers: 0

Is it possible to change title "Search: " before searching field?
I really need to change that for my project for different text but I didn't found the way to do it... maybe somebody knows how to change that?

Replies

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Yep, you can tweak language.search,

    Colin

  • trintrintravatrintrintrava Posts: 25Questions: 1Answers: 0

    @colin do you know if I can also give it a classname somehow?
    And thank you for your answer!

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Not in the configuration, but you can add a class in initComplete, something like http://live.datatables.net/civazitu/1/edit

    Colin

  • trintrintravatrintrintrava Posts: 25Questions: 1Answers: 0

    @colin Thank you very much!

  • trintrintravatrintrintrava Posts: 25Questions: 1Answers: 0

    @colin for some reason it doesn't work :c

    $(document).ready(function() {
    $('#example').DataTable( {
    initComplete: function() {
    $('.dataTables_filter').addClass('demon');
    },
    fixedHeader: true,
    dom: 'Bfrtip',
    "paging": false, <!-- отключение страниц 1-n внизу и переключения по страницам-->

    "info": false, <!-- отключение информации сколько из скольких показывается-->
    "scrollY": 400,
    "scrollX": true,
    buttons: [
    {
    extend: 'copyHtml5',
    text: 'Скопировать таблицу',
    className: 'button1',
    },
    {
    extend: 'excelHtml5',
    text: 'Скачать таблицу как Exel',
    className: 'button1',
    },
    {
    extend: 'csvHtml5',
    text: 'Скачать таблицу как CSV',
    className: 'button1',
    },
    {
    extend: 'pdfHtml5',
    text: 'Скачать таблицу как PDF',
    className: 'button1',
    }
    ],
    "searching": true,
    "language": {
    "search": "Поиск по таблице: ",
    "zeroRecords": "Совпадений не найдено"
    }
    } );
    } );

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Please update my test case to demonstrate the issue,

    Colin

This discussion has been closed.