Clone only one Paging Button

Clone only one Paging Button

BeanekBeanek Posts: 2Questions: 1Answers: 0
edited December 2018 in Free community support

Hello,
is it possible to just clone one paging button outside the maintable ? I know how to di it for the whole pagination

$(document).ready(function() {
  $("#example").dataTable();
  $("#mynewdiv").append($(".dataTables_paginate"));
} );

but is there a way to do it only for the last button ? Something like that.

$("#mynewdiv").append($(".dataTables_paginate.last"));

Thanks

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    There isn't a way of doing exactly that, but you can achieve the same effect using the page() method. e.g.:

    table.page('last').draw(false);
    

    in a click event handler for your button.

    Allan

  • BeanekBeanek Posts: 2Questions: 1Answers: 0

    Thank you Allan,
    It's exactly what i was searching for. :)

This discussion has been closed.