How to show pagination images using jQuery DataTables plugin?

I would like to show images instead of the next "last" text that is being displayed now. I tried just overriding the displayed text and it didn’t change anything. The "next" "last" text is still displayed, not to mention the fact that I still do not know how to change it to images.

$('#myTable').dataTable({
 "aaSorting": [[ 1, "asc" ]],
 "sPaginationType": "full_numbers",
    "oPaginate": 
    {
        "sNext": 'n',
        "sLast": 'l',
        "sFirst": 'f',
        "sPrevious": 'p'
    }
});

Does anyone know how to do this? I would think it would look like this:

    "oPaginate": 
    {
        "sNext": '<img src="myimage.jpg" />',
...
    }
+3
source share
3 answers

One year late, but it looks like he still remains unanswered.

/ , oPaginate oLanguage, :

$('#myTable').dataTable({
 "aaSorting": [[ 1, "asc" ]],
 "sPaginationType": "full_numbers",
 "oLanguage": {
    "oPaginate": {
        "sNext": 'n',
        "sLast": 'l',
        "sFirst": 'f',
        "sPrevious": 'p'
     }
  }
});

+4

, , , ... , :

oTable = $('#example').dataTable( {
        "ordering": false,
        //"sDom":"flrtip"
        "sDom":'r<"contactsTable"t><p>',
        "oLanguage": {
            "oPaginate": {
              "sNext": '<i class="entypo-right-circled" ></i>',
              "sPrevious": '<i class="entypo-left-circled" class="Dia_pagination_ico" ></i>'
            }
          }
    });

css , ,

+3
+1

Source: https://habr.com/ru/post/1781928/


All Articles