Pagination inside bootstrap modal window

2019-06-07 06:39发布

问题:

I am using the bootstrap modal window as data picker. But when having more results to pick displaying pagination. I want to load the next pages inside the same modal window when clicking on the pagination.

Can I do it in generic way like when any link clicked inside a modal window to load the content inside the same modal window, or do I need to implement this for each link separately using AJAX feature?

回答1:

Please refer this three links: There will help you for sure.

  • Reference-1
  • Reference-2
  • Reference-3


回答2:

You could change $('modal-body').html() on click.

The modal shows/hide without changing or reloading content. So you will have to restore the original content on hide maybe.

Use $('#myModal').on('hidden.bs.modal', function () {} to restore your original content.