Topic: Pagination bug with Datatables

Seth Killian free asked 5 years ago

When selecting a new page, the text turns white on a white background when it is selected. Is there any way to get rid of that?

Seth Killian free answered 5 years ago

Javascript file:

$(document).on(‘click’, ‘.pagination .page-link’, function() {
$(‘ .page-link’).css(“background-color”, “#007bff”);


CSS file (to remove blue outline) :

.pagination .page-link:focus {
 outline 0;

Mikołaj Smoleński staff answered 5 years ago

Hi Seth, Please add this code to Your stylesheet:
.pagination .page-link:focus {
 background-color: #007bff;

Seth Killian free commented 5 years ago

Hi Mikołaj, I've added it but now there's a new problem introduced which can be seen in the video below:

Mikołaj Smoleński staff commented 5 years ago

Please add this to Your scripts: $(document).on('click', '.pagination .page-link', function() { $(' .page-link').css("background-color", "#007bff"); }); It should work, but You need to remove the code from my first message. Regards

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No