-
AuthorPosts
-
August 20, 2015 at 12:17 pm #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 iconboxesthe 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
August 22, 2015 at 3:45 am #491659Hi Guenter!
That block is now in 2479-2517 (js/shortcodes.js).
Best regards,
JosueAugust 22, 2015 at 10:35 am #491698first 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.
August 22, 2015 at 7:59 pm #491753Hi,
Can you post the link to your website please?
Regards,
JosueAugust 23, 2015 at 10:43 am #491833see private content
August 24, 2015 at 7:48 pm #492461Hey!
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!
JosueAugust 24, 2015 at 8:42 pm #492492this 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 LimaCan be closed definitely
August 24, 2015 at 8:57 pm #492495Thanks, glad to help :)
Regards,
JosueAugust 24, 2015 at 10:17 pm #492519By 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 !!!
August 24, 2015 at 11:27 pm #492534Did you try the newest update (3.3.2)? it should be available for download now.
August 8, 2016 at 5:15 pm #669942hi 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
August 9, 2016 at 2:50 am #670123Hey!
We modified the code a bit. Please try it: https://kriesi.at/support/topic/single-toggles-besides-sibblings-each-other/#post-492461
Cheers!
IsmaelAugust 9, 2016 at 7:09 am #670172thanks 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)
August 9, 2016 at 6:48 pm #670482Hey, glad you found a workaround :)
Best regards,
Josue -
AuthorPosts
- The topic ‘Single toggles besides (sibblings) each other’ is closed to new replies.