jQuery provides us with a simple syntax to create UI Components on our website. Today, let’s use jQuery to turn a Squarespace button into a toggle that shows or hides a section.
Refactor your code to make it more reusable, and spend less time copying and pasting code around.
The jQuery fadeToggle() and slideToggle() methods give us simple ways to animate the visibility of elements on our page. But there are a few adjustments we need to make to get them to work properly in Squarespace.