Here is my JSFiddle. Yesterday I posted question that how to create hashtag url. I got an answer, but if I refresh, it start from initial.
For example: If I refresh on #content 2, it show #content 1. I don’t want that. I think I should use on load event. But don’t know how to implement here. Any solution for this ? Please help me.
I’ve answered this at Create hashtag url using jquery. Just sharing this here because the linked thread was originally only about updating the URL with a hash tag (fragment identifier, actually), but the same issue about retaining the content after reload was eventually brought up by the OP in that thread.
And for those who don’t wish to go the extra click, the codes are pretty straightforward. Just add the following after
function setActive(i) { // codes }: