How to get the parameter only from URL during window event
When the browser forward or back button is pushed, I use the code below to detect a URL parameter change. Note, the page never really changes, only the parameter that I add using a HTML data attribute.