Hi I followed the directions to add a JS code Link to accordion and open it so that the toggle hash would jump to the tab (Week2) here:
https://www.labyrinthofenchantment.com/june-symbolism/#week2
But it’s not working. Please advise?
Thanks!
Hi I followed the directions to add a JS code Link to accordion and open it so that the toggle hash would jump to the tab (Week2) here:
https://www.labyrinthofenchantment.com/june-symbolism/#week2
But it’s not working. Please advise?
Thanks!
Hello Rotipom,
Thanks for writing in!
It turns out that you have inserted an incomplete code. Please have you code updated and use this:
jQuery (function($){
$(window).load ( function() {
if(window.location.hash) {
var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
var header_height = 115 + $('#wpadminbar').height();
var yloc = $('[data-x-toggle-hash="' + hash + '"]').offset().top - header_height;
$('html, body').stop().animate({
scrollTop: yloc
}, 850);
}
});
});
I have removed linespace so that you can see the whole code at once.
We would love to know if this has worked for you. Thank you.
This worked, THANK YOU!!
You’re welcome!
It’s good to know that it has worked for you.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.