I need to call a function whenever this line is executed
window.location.hash = "#globalSearchView";
Currently I'm using hash change function
$(window).on("hashchange",function(e) {
var hash = window.location.hash;
switchtabs(hash);
});
It works only in case when hash is changed but doesn't work when same hash. I want to call a function switchtabs whenever this line
window.location.hash = "#whatever";
is executed no matter same hash or different. thanks
Maybe this?