How do I disable smooth scrolling sitewide?
]]>Is there a setting in the free edition of Blocksy (awesome theme!) where I can activate smooth-scrolling on anchor links?
I can’t find a setting for that…
Thx.
P.
]]>I know that in this thread includes js code and I know that this is not js forum ,but because it is everything else wordpress forum . I wil ask this question .
it is also not exactly js problem . it has to do with html and css and specially section targetting or smoothscrolling
first this is html code :
<section id="about">
<div class="scroll-target">
<div class="about-section-left-side">
<h3>About</h3>
<paragraph>
Lorem Ipsum is simply dummy text of the printing and typesett I</paragraph></div>
<div class="about-section-right-side"><img src="https://webdesignmaster.eu/wp-content/uploads/2023/08/test-image-for-website1.webp" alt="Website bouwen in Hoogvliet"></div>
</div>
</section>
<section id="webdesign">
<div class="scroll-target">
<div class="webdesign-section-left-side"><img src="https://webdesignmaster.eu/wp-content/uploads/2023/08/try-image1.webp" alt="webdesign"></div>
<div class="webdesign-section-right-side">
<h3>Webdesign</h3>
<paragraph>
orem Ipsum is simpl Lorem Ipsum has been the industry's standard dummy te<paragraph></div>
</div>
</section>
<section id="onepager">
<div class="scroll-target">
<div class="onepager-section-left-side">
<h3>OnePager</h3>
<paragraph>
orem er since the 1500s, when an unknown printer took a galley of e industry's standard dummy te<paragraph></div>
<div class="onepager-section-right-side"><img src="https://webdesignmaster.eu/wp-content/uploads/2023/08/tekst-image3-for-webdesign.webp" alt="website bouwen"></div>
</div>
</section>
<section id="contact">
<div class="scroll-target">
<div class="contact-section-left-side">
<h3>Contact</h3>
[wpforms id="126"]
</div>
<div class="contact-section-right-side">
<div class="first-section">
<h2>WIJ HELPEN JOU GRAAG!</h2>
<h3>We zijn bereikbaar op:</h3>
<h4>
Maandag t/m vrijdag: 9:00 uur tot 20:00 uur
Zaterdag & zondag: 10:00 uur tot 18:00 uur</h4>
</div>
<div class="second-section">
<h1>Langskomen op afspraak!</h1>
<h2>Telefoonnumer: 06xxxxxx</h2>
</div>
</div>
</div>
</section>
and this is small part css:
section {
display: flex;
justify-content: center;
align-items: center;
font-size: 1rem;
color: black;
min-height: 500px; /* Adjust this value as needed */
}
html {
scroll-behavior: smooth;
}
only with html and css with smooth scroller css code was one pager was working very wel in the begin but after it began a little deviation when I clicked on contact section.
I tried to change height to 60vh (in section) etc but it didn’t help .
so I tried js code which is :
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
function scrollToSection(sectionId) {
const section = document.getElementById(sectionId);
const offset = sectionId === 'contact' ? -100 : 5; // Adjust the offset as needed
if (section) {
window.scrollTo({
top: section.offsetTop + offset,
behavior: 'smooth'
});
}
}
</script>
and in header.php :
<nav>
<ul>
<li><a onclick="scrollToSection('#about')">About</a></li>
<li><a onclick="scrollToSection('#webdesign')">Webdesign</a></li>
<li><a onclick="scrollToSection('#onepager')">OnePager</a></li>
<li><a onclick="scrollToSection('#contact')">Contact</a></li>
</ul>
</nav>
it was working very wel after I inserted js code untill I made in contact section onother right-side section. class which you can see on my website.
it is not targetting anymore the contact section but the first field of wpform.
I have disabled wpform but the problem is the same. I added extra class above contact section but it didn’t help . I have changed js code but the problem is not solved.
I want only to know or some idea where it can the problem relies .
actually smoothscroll css code must be enough to function one page scrolling with custom links . can I solve this problem with css and html or I have to look for js libray or some examples in code pen . actually I have this code from code pen and there is working very perfect . I know there is difference between html and wordpress .
can some one expert tell me how I can solve this problem or at least where I have to look in js or in css?
I am all the day bussy only to solve this problem. I have also solved typewritter effect js problem. after all I tried free version of onepress but it is not for me .
you have to see also I am using flex maybe there can be some clue?
I have to solve this problem myself and it has to be.
thanks
]]>Works! I mean it does what it’s supposed to do, that the Pros.
Con… it removed my themes build in smooth scrolling, so now it’s a jerky scroll.
Anyway, to fix that.
Thanks!
Louie
Is it possible to implement smooth scrolling option and have the active menu tab highlighted on a floating/sticky menu in one page website.
Thanks
]]>I’ve a question you can sure easily help me.
At my website, I’ve to issues:
2 – in the menu all the items are highlighted. I would like to have them in white and just have coloured the activated section, i.e., the section in which the user is looking at.
3 – How can I activate smooth scrolling? It is going tooooo fast.
Many thanks
Nuno
I am using customizr pro. In Customizer/General Options I activated “Smooth scrolling”. Then I created a page with blocks featuring anchor IDs. Then I created menu links to those anchor IDs. When I click on a menu item which is a link to an anchor, the browser jumps immidiately to the anchor – no smooth scrolling at all
When I click on the “Up” button on the reight side, it perfectly scrolls very smooth to the top of the page …
How can I activate smooth scrolling for my anchor links? Is there something extra that I have to do besides switching on “smooth scrolling” in the global options?
Best regards,
Alex
PS: I know that in the latest version the scope of smooth scrolling has been reduced to the #content area, but this is perfectly the case here, the anchor IDs sit right in the middle of the page.
]]>Does anyone have an idea of how / why this might be happening? It seems my contact form as also changed without me doing any modification. Could it be due to a Hestia Update?
Thank you very much!
]]>I’m trying to launch Page Scroll to ID to have smooth scrolling on our features page, but when I activate the plugin the internal links actually stop working. I have a feeling there is another plugin that is interfering with it working but I can’t figure out which one. I’m really hoping I can get this working, any ideas?
Many thanks in advance
]]>