I have elements, which when clicked produces dynamic hashes when clicked. When I scroll to a different section I want hashes to be removed. I am using the following code to remove the hash. It seems to work however it get #undefined
as the hash.
$(document).scroll(function() {
if ($('.175').hasClass('act-link')) {
window.location.hash = $(this).attr('');
}
else {
//do something else
}
});