0
VISIT http://jsfiddle.net/housekeepings/qx5a4wf3/3/

The Tooltip function can work well on the first page, enter image description here

but failed when change to page two! enter image description here How can redraw the tooltip on the other page?

3
  • I would recommend looking at the draw event for DataTables and apply the tooltip there. This fires every time the table reloads so would include; paging, sorting, filtering etc datatables.net/reference/event/draw Commented Jan 16, 2019 at 16:24
  • @PaulZepernick Thank you~It works! Though the responsive "+" place still not working~But other paging is work well~So nice! Commented Jan 17, 2019 at 1:01
  • I added it as an answer. Thanks Commented Jan 17, 2019 at 18:27

1 Answer 1

1

The tooltip is being applied when the dom is ready on page load and is not being re-applied to new elements coming into the dom when the table view is drawn again. DataTables has a draw event that is triggered when the state of the table changes. A listener can be attached to this event and have the tooltip applied when the draw event fires.

$('#table_id').DataTable({responsive: true,}).on("draw", function() {
     $('[data-toggle="tooltip"]').tooltip();
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.