Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #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 (https://kriesi.at/support/topic/hidding-color-section/):

    function add_custom_cs () {
    ?>
    <script>
    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 ();
    });
    });
    </script>
    <? 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
    Grobi

    #1198592

    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,
    Victoria

    • This reply was modified 1 week, 4 days ago by  Victoria.
    #1198594

    Hi,

    Best regards,
    Victoria

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.