Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1212355

    Hi There,

    is it possible that no Tab is open by default?
    If I leave this option empty or choose 0 instead of a tab number, always the first one is open by loading. But I don´t want to be anything open…

    Thanks in advance

    KiM

    #1212373

    Hey Blatze,

    Please provide a link to the site/page in question so we can look into this issue further.

    Best regards,
    Jordan Shannon

    #1212972

    Hi Jordan,

    you can have a look here:
    https://www.paritosho-yoga.de/budokon-yoga-kurs-in-muelheim-an-der-ruhr/#tab-id-8
    login: please see private content, Site is under construction right now…

    Thank you! :)

    #1213693

    Hi,

    I added the following script and it should work for you:

    function add_custom_code(){
    ?>
    <script
      src="https://code.jquery.com/jquery-3.5.1.min.js"
      integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
      crossorigin="anonymous"></script>
    <script>
    jQuery(document).ready( function() {
        jQuery('.tab_content.active_tab_content').hide();
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_code');

    Best regards,
    Jordan Shannon

    #1220581

    Thank you! But now the first tab is complete invisible? 🤔

    #1222665

    Hi,

    I updated the code in functions.php file to following one

    function add_custom_code(){
    ?>
    <script>
    jQuery(document).ready(function(){
    	setTimeout( function(){ 
        jQuery("#custom-tabs div.tab.tab_counter_0").removeClass("active_tab");
    		jQuery("#custom-tabs #tab-id-1-container").removeClass("active_tab_content")
      }  , 1000 );
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_code');

    Please review your website :)

    Best regards,
    Yigit

    #1222669

    Thank you Yigit! Now it is awesome! Is there a way to have it only on mobile Phones? (430px)

    Note to myself: add ID #custom-tabs

    #1222671

    Hey,

    Yes, sorry forgot to mention that I have added a unique ID to make sure it does not affect other tab elements :)

    I changed the code to following one

    function add_custom_code(){
    ?>
    <script>
    jQuery(document).ready(function(){
    	if(window.matchMedia("(max-width: 480px)").matches){
    		setTimeout( function(){ 
        		jQuery("#custom-tabs div.tab.tab_counter_0").removeClass("active_tab");
    			jQuery("#custom-tabs #tab-id-1-container").removeClass("active_tab_content")
      		}  , 1000 );
    	};
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_code');

    Please review your website :)

    Best regards,
    Yigit

    • This reply was modified 4 years, 6 months ago by Yigit.
    #1222677

    Super cool!!! Thank you! 💪

    #1222788

    Hi,

    Did you need additional help or shall we close?

    Best regards,
    Jordan Shannon

    #1222799

    I’m happy! Thanks! :)

    #1222827

    Hi,

    If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Content Element Tabs’ is closed to new replies.