How To
Documentation
    Learn More

      class:toggle

      Description

      Applies a class to the target when toggled on.

      Usage

      as element:
      <class:toggle
             target="{string}"
             toggle-class="{string}"
             [name="{string}"]>
      </class:toggle>

      Directive info

      • This directive creates new scope.

      Parameters

      ParamTypeDetails
      targetstring

      jQuery selector for element

      toggle-classstring

      Name of class to toggle

      name
      (optional)
      string

      Name of toggle. If set the user's preference for the toggle will be saved

      Example

      <search:class-toggle target="#chart" class="hide" name="chart"></search:class-toggle>