How do I get the fragment identifier (value after hash #) from a URL? October 8, 2022 by Tarik No need for jQuery var type = window.location.hash.substr(1);