mirror of
https://github.com/torproject/support.git
synced 2024-12-13 12:15:40 +00:00
Fold out search result when direct linked
This commit is contained in:
parent
5b9d615784
commit
a94cdad245
@ -61,5 +61,17 @@
|
||||
});
|
||||
|
||||
$('.show').collapse();
|
||||
|
||||
// Coming from search result page click
|
||||
if(window.location.hash !== "") {
|
||||
// Somehow collapse is not working sync and calling show directly after
|
||||
// yields no effect and there is no callback when it is ready
|
||||
setTimeout(() => {
|
||||
// Folds out the answer manually
|
||||
$(window.location.hash).collapse('show')
|
||||
// Avoids the answer being hidden by the floating header
|
||||
window.scrollTo(0, $(window.location.hash).position().top)
|
||||
}, 500)
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user