• Resolved Graicifyd

    (@graicifyd)


    Is it possible for me to add an onlick event to a button such that when it is clicked on, a div is revealed? The div is dependent on the button.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @graicifyd

    A button does not accept dependencies, but you can show the hidden Div field by programming.

    1. Assign two class names to the Div field, a custom class name, and the hide class name. for example, my-div hide

    Enter the class names through the “Add CSS Layout Keywords” attribute in the settings of the Div field.

    2. Edit the onclick event of the button as follows:

    jQuery('.my-div').removeClass('hide');

    And that’s all.
    Best regards.

    Thread Starter Graicifyd

    (@graicifyd)

    Thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ONCLICK EVENT TO REVEAL A DIV’ is closed to new replies.