jQuery : DataTables : Disable sorting for all columns

Enable or disable sorting of columns

Sorting of individual columns can be disabled by the “bSortable” option for each column.

Note that this will disable sorting all around, so there is no need to disable it on individual columns Continue reading

Advertisements

jQuery DataTables: Turn off sorting of a particular Column

You can also disable sorting feature of any column of the table you want in different ways. There are simple and easy to use options to disable sorting of columns in jQuery DataTables..

One is passing index and the other is passing class name of the column.
Continue reading

jQuery : JS : Disable/Enable scroll bars programmatically

/**
 * Disables the scroll of window
 *
 * @param selectorOfWindow
 * @author Shiva Bhusal
 */
function disableScroll(selectorOfWindow){
 $(selectorOfWindow).find('html, body').css({
 'overflow': 'hidden',
 'height': '100%'
 })
}
/**
 * Restores the scroll of window
 *
 * @param selectorOfWindow
 * @author Shiva Bhusal
 */
function restoreScroll(selectorOfWindow){
 $(selectorOfWindow).find('html, body').css({
 'overflow': 'auto',
 'height': 'auto'
 })
}