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: Wrong JQuery Selector in Datatable JavaScript code

Kali360 free asked 5 years ago


Ladies and Gentlemen,

I had an issue with another input field in combination with datatables. https://mdbootstrap.com/docs/jquery/tables/datatables/ There is a wrong selector in the JavaScript Code for "Material Design example" on lines 8 and 9:

$('input').attr("placeholder", "Search");
$('input').removeClass('form-control-sm');

It has to be changed to:

$(this).attr("placeholder", "Search");
$(this).removeClass('form-control-sm');

With the "this" selector are not all input fields selected what is annoying.

Thanks for changing


MDBootstrap staff answered 5 years ago


Hi Kali360,

I fixed this part thanks to this report. Thank you for contributing.

Have a nice day!

Best Regards, Piotr



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.2
  • Device: Dell XPS 15
  • Browser: Firefox
  • OS: Windows 10 Pro
  • Provided sample code: No
  • Provided link: Yes