Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #1198011

    Hi Kriesi team,
    I would like to open several hidden color sections on one page using several buttons (one button per section).
    I assigned a unique class to the button and assigned a unique ID to the color section to be opened.

    Then I used this code from Yigit (

    function add_custom_cs () {
    jQuery (window) .load (function () {
    jQuery (“# ​​your-unique-color-section-id”). hide ();
    jQuery (“.your-custom-button-class”) .click (function () {
    jQuery (“# ​​your-unique-color-section-id”) .toggle ();
    <? php
    add_action (‘wp_footer’, ‘add_custom_cs’);

    The code works great as long as I have defined one button and a section and the information is used accordingly in the code.
    The moment I adjust the code for another section, I get a critical error.
    Can you help me?
    Best regards


    Hey Grobi,

    Are you adding the same function name again? You need to use a different function name or combine the code into one function.

    I am closing this thread as a duplicate. Please do not post duplicate threads.

    Best regards,

    • This reply was modified 3 months, 2 weeks ago by  Victoria.


    Best regards,

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘How to hide/open more zhan one color section via button’ is closed to new replies.