How to disable smooth scroll in Bricks

In certain situations like using ScrollSmoother from GreenSock you may be looking to disable smooth scrolling functionality that’s built into Bricks.

To disable Bricks’ smooth scrolling, go to Bricks → Settings → Custom code and add this in the Body (footer) scripts text area:

<script>
window.bricksSmoothScroll = () => false
</script>

Reference

https://brickslabs.com/how-to-wrap-main-element-in-custom-divs-in-bricks/#comment-263

Get access to all 526 Bricks code tutorials with BricksLabs Pro

1 comment

  • This doesnt work. Tried it with both the css smooth scroll on and off in the new settings options since 1.7.1. Any other ideas?

Leave your comment

 

Related Tutorials..

How to sync two nestable sliders in Bricks

How to sync two nestable sliders in Bricks

In this tutorial, we'll learn how to sync two nestable sliders in Bricks: one will be the main slider and the other one will be…
Categories:
Auto-switching Bricks Tabs

Auto-switching Bricks Tabs

How to switch tabs every x seconds when the tabs element is scrolled into view.
Categories:
Pro
tsParticles in Bricks

tsParticles in Bricks

Updated on 5 Aug 2023 This Pro tutorial provides the steps to set up tsParticles, a lightweight TypeScript (uses JavaScript) library for creating particles as…
Categories:
Opening RSS Block’s Links in New Tabs

Opening RSS Block’s Links in New Tabs

Looking to have links output by RSS Block (in the block editor) in new tab/window when using Bricks? Add this in your Bricks template/Page at…
Categories:
Pro
Switching Tabs on Hover in Bricks

Switching Tabs on Hover in Bricks

This Pro tutorial shows how to make the tabs of Tabs (Nestable) elements active on hover in Bricks. Step 1 Add one or more Tabs…
Categories:
Pro
Opening Submenus with Click Instead of Hover in Bricks

Opening Submenus with Click Instead of Hover in Bricks

This Pro tutorial provides the code for opening submenus with click instead of hover in Bricks. Step 1 Add this in child theme's style.css: Step…
Categories:
How to Create a Grid Slider in Bricks

How to Create a Grid Slider in Bricks

In this tutorial, we'll learn how to create multiple rows and columns inside the default nested slider of Bricks. Introduction A user recently asked in…
Categories:
How to change the text of an element based on breakpoints without creating duplicated content

How to change the text of an element based on breakpoints without creating duplicated content

In this tutorial, we'll learn how to dynamically change the text of a basic text element based on the viewport width in Bricks. Introduction Sometimes…
Categories: