I have a code snippet that I will be using across numerous pages. This code is used for updating the column headers in a table to show if a column is sorted ascending or descending. I would like to place in a separate .js file rather than duplicating it across all pages. The snippet works correctly when it is within the $("body").on("click") function. When I move it to its own function and call that function, the script executes, however the results of the addClass/removeClass don't persist to the web page. Any assistance would be appreciated. I am quite new to JQuery and haven't found any direct help for this.I have a code snippet that I will be using acro