This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Get Visu hash
#1
Hi @all
I would like get the Visu hash on every change. Is It possible?
I have done this script in Javascript I get the hash on the first load of the page.
Code:
var test = location.hash;

console.log(test); //this works

window.addEventListener('hashchange', function() {
 
    var nuovoHash = location.hash;
   
    console.log('Il hash è cambiato in: ' + nuovoHash);
 
});  //this doesn't works
Best regards Cristian
Reply
#2
Use this to listen to plan ID changes:
Code:
Visu.on('active-plan-change', ({ newId, oldId }) => {
  console.log(`active plan id changed from ${oldId} to ${newId}`)
})
Reply


Forum Jump: