• Resolved BenDlz

    (@bendlz)


    Hi,

    I’m using WP Post tabs on my website, and it is pretty nice, thank you.
    On my website, I use multiple tabs containers for each article. They all have the same 2 tabs (A and B).

    I’d like to put a button which will change all my tabs container to the same tab (A or B).

    If needed, I can create my own function to do the switches, I’d just need to know if there is an API to call to change the active tab?

    I plan to buy the PRO version in the next few days, will it help to achieve what I try to do?

    Thanks!
    Ben

    https://wordpress.org/plugins/wordpress-post-tabs/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello Ben

    Thanks for writing to us.

    Can you please provide us the URL of page where the tabs are embedded, so that we will also take look your page and site and depend on that we will send you modified JS file.

    Waiting for your response.
    Thank you for all your patience.

    Best Regards,
    Sagar.

    Thread Starter BenDlz

    (@bendlz)

    Hi,

    Thanks for your answer, and sorry for the late reply.
    Here is an example page including it: http://docs-at.azurewebsites.net/ios-en/screen-and-application-indicators/

    Thanks,
    Ben

    Hello Ben

    Thanks for your response.
    Please follow below steps to change both tabs on one button click

    1. Create a button on your page with id testbutton.
    2. Paste below code in your theme’s footer.php

    jQuery(document).ready(function(){
    	jQuery("#testbutton").click(function(e){
    		tabs_3881_2.tabs("option","active",1);
    		tabs_3881_3.tabs("option","active",1);
    	});
    });

    Let me know if it helps.
    Thank you,

    Best Regards,
    Sagar.

    Thread Starter BenDlz

    (@bendlz)

    Hi Sagar,

    Thank you for your fast answer!
    I integrated it, just a few modifications:

    jQuery(".switch_option").click(function(e){
      var postid = $('.switch_button').data('postid');
      var optionId = $(this).data('optionid');
      jQuery('div[id*="tabs_'+postid+'"]').each(function() {
        jQuery(this).tabs("option","active",optionId);
      });
    });

    Thank you,
    Best regards,
    Ben

    Hello Ben

    Thanks for using WordPress Post Tabs and writing to us. If WordPress Post Tabs has been helpful to you please post your rating at
    https://wordpress.org/plugins/wordpress-post-tabs/

    There is a rating section on this page where you can provide your rating about the plugin. In case your rating is less than 5, kindly let us know. We would like to hear your inputs so that we serve you with best Tabs and support.

    Best Regards,
    Sagar
    TabberVilla Support Team.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change all post tabs at once’ is closed to new replies.