Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #490684

    concerning to this old entry :

    https://kriesi.at/support/topic/hide-toggles-if-a-toggle-is-open/#post-122632

    i’m searching for a solution too
    These are 5 single toggles in iconboxes

    the tipp is a bit confused since shortcodes.js is different now.
    i would like to have a solution for the site you see in private content.

    Thanks

    #491659

    Hi Guenter!

    That block is now in 2479-2517 (js/shortcodes.js).

    Best regards,
    Josue

    #491698

    first of all yes i found this part too – and i guess it must be changed the code from 2479-2521

    but it does not work !

    there are some new features and a new class goes to content (active_tc) not only the title (activeTitle) so i thought it has to be prepared that code for the new shortcodes.js

    Maybe my construct is totaly different to the old thread i mentioned above

    i put in the iconbox via htmlcode a single tab

    • This reply was modified 9 years, 3 months ago by Guenni007.
    #491753

    Hi,

    Can you post the link to your website please?

    Regards,
    Josue

    #491833

    see private content

    #492461

    Hey!

    Check it now, i ended up using a custom script (child functions.php) instead of modifying shortcodes.js:

    function only_one_toggle_open_at_the_same_time(){
    ?>
    <script>
    (function($){
        $(window).load(function() {
        	$('.toggler').on('click', function(){
      		$('.toggler').not(this).next().removeClass('active_tc');
                    $('.toggler').not(this).removeClass('activeTitle');	
    	});
        });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'only_one_toggle_open_at_the_same_time');

    The ul issue should be fixed in the newest version of the theme.

    Cheers!
    Josue

    #492492

    this is indeed the best solution ( royal road) to get it.

    Thanks for that ( and its not for taken be granted ) you found a solution !!!
    And greetings to Lima

    Can be closed definitely

    #492495

    Thanks, glad to help :)

    Regards,
    Josue

    #492519

    By the way its not only an ul issue – it seem to be a text issue too. Because alot of p tags everytime a text-block is editied are added !!!

    #492534

    Did you try the newest update (3.3.2)? it should be available for download now.

    #669942

    hi josue

    the functions.php – works well on that but now i want to influence the color of the activeTitle too!
    the active Title on the page has got the Class: activeTitle
    how do i get rid of that similar to active_tc ?

    Thanks – i guess Josue knows how :wink

    PS : i think the line it depends on in shortcodes.js is on 2528

    #670123

    Hey!

    We modified the code a bit. Please try it: https://kriesi.at/support/topic/single-toggles-besides-sibblings-each-other/#post-492461

    Cheers!
    Ismael

    #670172

    thanks ismael but it does not work. The class still is there on all clicked buttons.
    the code of that segment :

    <div itemprop="text" class="iconbox_content_container "><div class="togglecontainer toggle_close_all avia-builder-el-15 avia-builder-el-no-sibling enable_toggles">
    <section class="av_toggle_section">
    <div data-tags="{Alle} " class="single_toggle">
    <p data-fake-id="#toggle-id-3" class="toggler activeTitle">Toggle 3</p>
    <div class="toggle_wrap" id="toggle-id-3-container" style="">
    <div class="toggle_content">
    <ul>
    <li>Toggle Content goes here</li>
    <li>Toggle Content goes here</li>
    <li>Toggle Content goes here</li>
    </ul>
    </div>
    </div>
    </div>
    </section>
    </div>
    </div>

    the activeTitle class is in the p tag above – and you see these “Toggles” are no Siblings in the real meaning of the sense.
    They are single Toggles but on the same page.

    With the class active_tc it works perfect but you gave me the correct hint:
    This code ( don’t ask me why) works:

    function only_one_toggle_open_at_the_same_time(){
    ?>
    <script>
    (function($){
        $(window).load(function() {
        	$('.toggler').on('click', function(){
      		$('.toggler').not(this).next().removeClass('active_tc');
    	});
        	$('.toggler').on('click', function(){
                    $('.toggler').not(this).removeClass('activeTitle');	
    	});
        });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'only_one_toggle_open_at_the_same_time');

    can be closed (wow soon i got my 1000 postings here)

    #670482

    Hey, glad you found a workaround :)

    Best regards,
    Josue

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Single toggles besides (sibblings) each other’ is closed to new replies.