Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #1366382

    Hi guys,

    A few years ago, I think I saw this somewhere but I can’t find it anymore. What I try to achieve is the following (please see screenshot here):
    On the left there are text links (arrow1), by clicking on one of those, the content on the right side should change (arrow2)according to the specific subject.
    Is there a plugin available (couldn’t find one) or do-able by adding some fuctions/css rules?

    Thanks in advance!

    Regards,

    Steven

    #1366489

    Hey steviger,

    Thank you for the inquiry.

    Have you tried using the Accordion or Tab elements? They don’t look exactly like the screenshot but clicking on each toggle or tab should open their corresponding content.

    Best regards,
    Ismael

    #1366509

    Hi Ismael,

    I sure did look at that but the point is that I need two columns with text links. When I use the tab element with the vertical tabs there will be a lot of whitespace at the bottom right because we will need 10 tabs.
    Indeed the Accordion could be an option but I prefer the “compact-ness” in my screendump. This way we can limit the height of the page.

    Best regards,

    Steven

    #1366628

    Hi,
    Try the WP-ShowHide plugin, then use two columns, the left column will have your links, each one needs to be wrapped the trigger shortcode, then the column on the right will have all of the text for each trigger, and wrapped in the correct shortcode to match the trigger.
    Then use the shortcode option to leave your first one showing, all the others will be hidden.
    Then each trigger link clicked will hide the one showing and show the new one.
    I’m not an expert with this plugin, but I saw this setup on someone’s site a while back and it worked as you described.

    Best regards,
    Mike

    #1366703

    Hi Mike,

    Thanks for the suggestion. I’ve been trying for quite a while now how to get it working as you discribed but I can’t get it to work. I think I’ll suggest the Accordion element in two separate columns to my client.

    Thanks for the input anyway!

    regards,

    Steven

    #1366704

    Hi,
    Glad to try to help, shall we close this then?

    Best regards,
    Mike

    #1366705

    Yes please

    #1366711

    well – i try to find a solution so – please let the topic open for a while.

    #1366715

    That’ll be great!

    #1366722

    Hi,
    Thank you Guenni007, we will leave this open.

    Best regards,
    Mike

    #1366771

    read first the way over tab alb : https://kriesi.at/support/topic/show-content-in-div-on-click/#post-1366868

    Solution see later

    If there are any questions – feel free to ask

    • This reply was modified 2 years, 1 month ago by Guenni007.
    #1366772

    best solution is over tabs wihich can be styled the way you wanted

    so I have deleted the unnecessary here

    #1366859

    If I have misinterpreted your picture and description, then one could now easily rewrite the whole thing to the td instead of tr.

    #1366868

    see here a solution with tab:
    https://enfold.webers-webdesign.de/toggle-content/

    guess this will be the more elegant way to use enfold standard ALB Element.
    and big advantage : no duplicate content

    #1366876

    Hi Guenni,

    Thanks for your elaborate work, looks awesome!. I agree to your solution with tabs. The idea is that every single textlink will need different content.
    Probably I miss something but in your example: https://enfold.webers-webdesign.de/toggle-content/ I see that the two words in one line (Rotox and fillers and SkinCeuticals) have the same link whereas Rotox and SkinCeuticals should have their own link .

    Best regards,

    Steven

    #1366962

    yes – I almost suspected that, but of course it wasn’t obvious from your screenshot.
    Unfortunately, this method is probably not applicable then. …

    Edit – see now : https://enfold.webers-webdesign.de/toggle-content/

    by the way : this will end in frontend layout:
    odd tab-titles count will be on the left – even tab-titles count on the right.
    _

    #1366993

    by the way – not necessary for the solution above but …
    – there is that option to give to the tabs an custom ID – if not they will have those data-fake-id = #tab-id-1, etc
    these are part of the url shown on the browser window.

    try then in your child-theme functions.php:

    
    function tab_titles_to_data_fake_id() { 
    ?>
    <script type="text/javascript">
    (function($){
    	$(window).on('load', function(){
    	    $('.tabcontainer .tab_titles .tab[data-fake-id^="#tab-id"]').each(function() {
    	    	var tabTitle = $(this).clone().html().replace(/\s+/g, '-').toLowerCase();
    	    	$(this).attr('data-fake-id', '#'+tabTitle);
    	    });
    	  	$('.tabcontainer .av_tab_section .tab[data-fake-id^="#tab-id"]').each(function() {
    	    	var tabTitle = $(this).clone().html().replace(/\s+/g, '-').toLowerCase();
    	    	$(this).attr({
    	    		'data-fake-id': '#'+ tabTitle ,
    	    		'aria-controls': tabTitle +'-content',
    	    	});
    	    	$(this).closest('.av_tab_section').find('.tab_content').attr('id', tabTitle +'-content');
    	    });
    	}); 
    })(jQuery);
    </script>
    <?php 
    }
    add_action('wp_footer', 'tab_titles_to_data_fake_id');
    

    if a data-fake-id starts with #tab-id it will be replace with the tab-title ( lowercase and spaces to “-” )


    PS
    i don’t know if this is good practice because i do not think that if the toggle ID’s are indexed that this jQuery will be work as expected.

    #1367004

    Sorry my Provider has some Maintenance work

    Edit:
    ok – it seems to be fixed

    #1367749

    A good solution with no response from you … – https://enfold.webers-webdesign.de/toggle-content/

    #1367781

    Hi Guenni,

    Sorry about that. I missed your edit about the maintenance work…Your solution looks awesome. Will implement it asap and let you know ok?

    Regards,

    Steven

    #1367812

    Hi,

    It works like a charm! Guenni for president!

    Thanks again for your time and effort.

    regards,

    Steven

    #1367832

    Hi,
    Glad Guenni007 could help, thank you Guenni007.

    Best regards,
    Mike

    #1367843

    There is no need to thank me, only positive feedback means that I no longer have to keep an eye on the subject and can simply tick it off.

Viewing 23 posts - 1 through 23 (of 23 total)
  • You must be logged in to reply to this topic.