- This topic has 8 replies, 2 voices, and was last updated 4 years, 12 months ago by
itsmeypk. This post has been viewed 971 times
-
AuthorPosts
-
July 13, 2021 at 8:54 pm #10038827
itsmeypk
ParticipantHi,
First of all, thank you for the excellent template, and it is incredible.
Coming to the issue , in the left sidebar, I have added the multiple toggle sections and making active link id=”activeLink” dynamically through JS code and using the below code to scroll to acive link.
$(window).on('load', function(){
$('#sidebar').animate({
scrollTop: $('#activeLink').offset().top - 64
}, 300);
});Here I am facing two issues.
Issue-1: The sidebar scrolling some length but not as expected.
Issue-2: Scrolling of the left sidebar is resetting when I scroll the mouse for the main content page.Would you please help me with the resolution for the two issues?
Template Version: 9.0.0July 13, 2021 at 10:45 pm #10038832Support
KeymasterHello,
Sorry but I’m note sure how to reproduce the issue you mentioned in the ticket but here’s what you can try:
$(window).on('load', function(){ setTimeout(function(){ $('#sidebar').animate({ scrollTop: $('#activeLink').offset().top - 64 }, 300); , 1000); });Put a setTimeout to scroll after the toggles open. Also change the number 64 if you need.
Issue 2 I could not understand. Sorry.
Regards.
Okler Themes
July 13, 2021 at 11:05 pm #10038836itsmeypk
ParticipantThis reply has been marked as private.July 13, 2021 at 11:43 pm #10038840Support
KeymasterHi,
Try to change from the animate and use this code:
$(window).on('load', function(){ setTimeout(function(){ $('#sidebar').scrollTop($('#activeLink').offset().top - 64); , 1000); });Remove that old one with $(‘#sidebar’).animate({
Let me know if you have any questions.
Kind Regards,
Jonas
July 14, 2021 at 1:33 am #10038843itsmeypk
ParticipantThis reply has been marked as private.July 14, 2021 at 4:12 am #10038846Support
KeymasterHello,
The problem is that you are using the pin wrapper that is activated with scroll, so simulate scroll on page load:
$(window).on('load', function(){ setTimeout(function(){ window.scrollTo(window.scrollX, window.scrollY - 1); window.scrollTo(window.scrollX, window.scrollY + 1); , 500); setTimeout(function(){ $('#sidebar').scrollTop($('#activeLink').offset().top - 64); , 1000); });Change the css to make the sidebar the size of the screen:
.pin-wrapper, #sidebar:not(.sticky-active) { height: auto !important; max-height: 100% !important; } html.sticky-header-active #sidebar { max-height: 100% !important; height: 81vh !important; } html.sticky-header-active #sidebar { height: 93vh !important; }Regards.
Jonas
July 14, 2021 at 4:44 pm #10038848itsmeypk
ParticipantThis reply has been marked as private.July 15, 2021 at 12:31 am #10038854Support
KeymasterThis reply has been marked as private.July 15, 2021 at 1:55 am #10038856itsmeypk
ParticipantThank you..
-
AuthorPosts
This topic is marked as "RESOLVED" and can not rceive new replies.