Update 3.10.2

New: A new Base.js function that detects a click on an element and toggles a class in another element. To acheive this do the following to the clickable element:

  • Add a class called toggler.
  • Add an attribute called data-selector which contains a CSS selector pointing to the element(s) you want to toggle.
  • Add an attribute called data-toggle-class which contains a CSS class you want to toggle (add if not there/remove if is).
  • Examples: Put the first one on the page to open the subscription form and the second on the subscription form to close it.
    • <span class="button toggler" data-selector="#subscription-form" data-toggle-class="show">Subscribe Now</span>
    • <span class="button toggler" data-selector="#subscription-form" data-toggle-class="show">Close</span>