Topic: Pagination bug with Datatables

Seth Killian free asked 6 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 6 years ago


Javascript file:

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

 

CSS file (to remove blue outline) :

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

Mikołaj Smoleński staff answered 6 years ago


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

Seth Killian free commented 6 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: https://streamable.com/py5p4

Mikołaj Smoleński staff commented 6 years ago

Please add this to Your scripts: $(document).on('click', '.pagination .page-link', function() { $('li.active .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.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

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