I've looked at a few other dated questions on this site and have found their solutions don't seem to work on modern browsers anymore.
var foo = function() {
console.log('woohoo');
};
foo();
I want this to run everytime. I obviously have no problem running it on the first initial load but I am using url hashes to hide and show certain divs of content. When a user clicks forward and backward I would like this function to run again as well.