Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Pagination bug with Datatables

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


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

Seth Killian free commented 7 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 7 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