I am trying to get the page to reload with the #hash value, so that on page refresh it takes the hash value and spits out a function. This works in all browsers except for all versions of IE. When I click on the link, it adds the #value, but then after the reload it says #undefined.
Any idea what could be causing this?
Note:
- I need the page to reload
- It does not need to go to where the hash is, it needs to view the whole page from the top
//refreshes the page when the #by-date-link is clicked
$('.sort-trigger').on('click', function(e){
e.preventDefault();
var urlHash = $(this).attr('href');
window.location.hash = urlHash;
window.location.reload();
});