• Resolved zukenstein

    (@zukenstein)


    Following your helpful support, I now have the following onclick event on an image to trigger displaying a field.

    onclick="jQuery('.field-1').toggleClass('hide')"

    I would like to hide another field (field-2) by using the same onclick event at the same time ie

    field-1 hidden
    field-2 visible

    Click image

    field-1 visible
    field-2 hidden

    Have tried various things to do this but no joy, could you help on this please?

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

    (@codepeople)

    Hello @zukenstein

    The process is really simple. Edit the onclick event as follows:

    
    onclick="jQuery('.field-1,.field-2').toggleClass('hide')"
    

    One of the fields must have assigned the hide class by default.

    Best regards.

    Thread Starter zukenstein

    (@zukenstein)

    Simple when you know how!!!

    Thanks so much was driving me mad!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Onclick events’ is closed to new replies.