In my web application I have a URL using a fragment like so:
http://example.com#login
My question is: can I use the fragment on page load to open a specific portion of my website? If so, how can I use Javascript or jQuery to read and process the fragment?
Background information: I use Remodal (https://github.com/VodkaBears/Remodal) to add custom modal windows to my website. This plugin automatically appends a fragment to the current URL when a modal window is opened. I would like to be able to open modal windows on page load.
You can use
window.location.hash
to read the fragment in the URL on load and the open the related modal.