Addition:
I tried this:
$(window).load(function() {
$actualhash = window.location.hash;
$(".toggler").on('mousedown', function(){
$actualhash = window.location.hash;
});
$(".toggler").on('click', function(){
setTimeout(function(){
window.location.hash = $actualhash;
}, 10);
});
});
It works, but seems to be a dirty workaround. Do you have a better solution?
It would be nicer if I could generally deactivate the anchor for toggles etc.
Hi Josue,
thanks for your example!
Unfortunately this solution would remove the other (necessary) anchor-tags, which I want to use furthermore.
Readout the actual anchor before changing and inserting it on click doesn’t also work, because the toggler-click-function always seems to change the actual anchor :-(. Is there a possibility to grab the anchor BEFORE it has been overwritten by the toggler?
Regards,
Tine
Hey Rikard,
thanks for your response! The site isn’t online yet (working on my localhost).
Presumably I can’t deactivate the anchor-links for the active elements?
Thanks,
Tine