It might happen that you use the hash of a URL to jump to a section of a webpage, or bypass some steps in a quiz/tool, etc. Here is a solution using window.location.hash.split(‘?’);
For tracking purpose, we sometimes want to update the page url parameters but not refresh that page (ie: single page application). For instance, if we have a progress tracking or to come back to a specific place later.
Run a “then” function as an “each jQuery” call is completed. The worse way to do it is to have a setTimeout delay before to call the function you wish. The good way to do it is to use promise to set a callback after all asynchronous each loop are completed.