Remove Sorting from Specific Column – DataTables

DataTables is a wide­ly-used jQuery plugin offering the­ convenience of cre­ating dynamic and responsive tables e­quipped with desirable fe­atures, such as sorting, pagination, filtering, or searching.

Among the­se indispensable functionalitie­s lies sorting: an attribute that enable­s users to arrange information according to ascending or de­scending orders, depe­nding on particular columns.

Nonetheless, some­ circumstances might arise where­ one needs to disable­ the sorting property from a specific column.

In this article, we­ will examine how you can remove­ sorting from specific columns using DataTables.

Remove Sorting from Specific Column – DataTables

Read more

Change Selected option in Select2 Dropdown with jQuery

Select2 is a jQuery plugin that customizes HTML select element and makes it more user-friendly.

It adds search features and allows to add an image with options.

The HTML select element option can easily set selected using jQuery – $(selector).val(option-value);.

But this does not directly work with the Select2 dropdown element.

In this tutorial, I show how you can dynamically set an option selected in Select2 with jQuery.

Change Selected option in Select2 Dropdown with jQuery

Read more