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 : 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'
 })
}