Anchor Link in url string
Closed this issue · 2 comments
kaspar-allenbach commented
Hi.
Is it possible to append an anchor link to the url when reaching each section?
cmpolis commented
Yup, this could be done with the onPageChange callback function
cezarypiatek commented
For future readers:
$.scrollIt({
onPageChange: function(index)
{
var anchor = $("[data-scroll-nav='"+index+"']").attr("href");
if(anchor && anchor != "#")
{
location.hash = anchor;
}
}
});