Add new comment

Thanks for your code.
I changed it some and I figured I would pay you back with my changes.
With your code, the left side borders have no radius since an empty LI gets created with the initial UL creation in jquery.

So instead of building a UL and adding to it, just build the entire HTML and build it at once.
-----------------------------------------------------------------------------------------------

$(document).ready(function () {
  $('.bs-pagination td table').each(function (index, obj) {
    convertToPagination(obj)
  });
});

function convertToPagination(obj) {
  var liststring = '<ul class="pagination">';

  $(obj).find("tbody tr").each(function () {
    $(this).children().map(function () {
      liststring = liststring + "<li>" + $(this).html() + "</li>";
    });
  });
  liststring = liststring + "</ul>";
  var list = $(liststring);
  list.find('span').parent().addClass('active');

  $(obj).replaceWith(list);
}