Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular

    REMINDER

    Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

    SOLVED Tabs Section Not Working

    Cloud CMS (Pagebuilder, Blog, Shop, Newsletters, Code Editor)
    2
    7
    768
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      Kirk Brown last edited by

      Hello. I added an additional tab button to my tab section and now it is not working.
      The issue can be found on this page: https://dynamiccelebrationlighting.com/Locations-We-Service

      Also, is there a way to make it so no tabs are open on page load? I want only a tab to start showing when clicked.

      Thanks!

      Wassim 1 Reply Last reply Reply Quote 0
      • Wassim
        Wassim @Kirk Brown last edited by

        @kirk-brown hi, I think your tabs are wrongly configured. But as you can't have no tabs opened I would recommend you to code your entire system :
        1 - create the buttons without the tabs plugin
        2 - on each button add a class my-tab-button and a custom attribute data-area="main-line" with the appropriate area inside.
        3 - create one row per area and add the class my-tab-content and a custom attribute data-area="main-line" with the appropriate area inside.
        4 - on your button go to trigger => javascript code => and add this code

        $('.my-tab-button').click(function () {
          $(".my-tab-content").removeClass("opened");
          $(".my-tab-content[data-area='"+$(this).attr("data-area")+"']").addClass("opened");
        });
        

        5 - add the following css

        body:not(.pagebuilder-edition) .my-tab-content:not(:opened) {
          display:none;
        }
        

        Note that the body:not(.pagebuilder-edition) is just to still see your items while you're in the pagebuilder.

        Wish you'll do it successfully 🙂

        K 1 Reply Last reply Reply Quote 1
        • K
          Kirk Brown @Wassim last edited by

          @wassim
          Hello. Thanks for this. I will try this later today. Will this still be responsive and display well on mobile?

          Wassim 1 Reply Last reply Reply Quote 1
          • Wassim
            Wassim @Kirk Brown last edited by

            @kirk-brown of course yes 🙂

            K 2 Replies Last reply Reply Quote 0
            • K
              Kirk Brown @Wassim last edited by

              @wassim Where do you add the CSS code? How do you get there?

              1 Reply Last reply Reply Quote 0
              • K
                Kirk Brown @Wassim last edited by

                @wassim
                I followed your instructions and it seems to not work.
                Also, I would like only one tab content area open at a time so if one is alreay open and you click a different button, it will close the first tab content and open a new one. I'm assuming the code above won't achieve this.

                Wassim 1 Reply Last reply Reply Quote 0
                • Wassim
                  Wassim @Kirk Brown last edited by

                  @kirk-brown it does meet all your requirement.

                  Add the jQuery code into a jQuery source code and the CSS into a CSS source code.

                  bcfa24ad-b49d-4545-af39-d2564f84ecdd-image.png

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post