Button in content of tabs hyperlinks to next tab

Hi there,

I’m using tabs of the X theme to list some text with images. I have 4 tabs and each tab has a column at the left side with an image and at the right side a column with text. Below that text there is a button. I would like to that the button hyperlinks to the next tab. So when you press on the button, it will breng you to the next tab. The website where its on is at: http://nieuwesite.investorready.nl/

I’ve been looking through the forums and documentation but so far haven’t found anything specific on this topic. I was hoping someone could provide me and possible others struggling with this with a solid solution.

Thank you so much.

Hello @VS_Online_Media,

Thanks for writing in! Regretfully we cannot give any further comments because we cannot check your site. It asks for a password before we can view the page. Could you please provide the password?

Regards.

Ah sorry for that!

I’ve added the password as a secure note in my 1st post.

Hello @VS_Online_Media,

This particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself.

To get you started with and achieve what you have in mind, edit the page in Cornerstone, find the custom js section, Custom JS and insert the following custom js code

(function($){
  $('.x-tabs-panel .knop-ir-home-blauw').each(function(){
    var element = $(this);
    element.on('click touchstart', function(e){
      var next = $(this).parents('.x-tabs-panel.x-active').next().data('x-toggleable');
      e.preventDefault();
      $('.x-tabs-list button[data-x-toggleable="' + next + '"').trigger('click');
      console.log(next);
    });
  });
})(jQuery);

The code is at your disposal. It might need some modifications to it.

Thank you for your understanding.

Thank you for your reply. I’ve used the JS code like you said and it worked. Thank you very much!

You said it might need some modifications, but it works… So it’s good as it is or do I need to change anything?

Hey @VS_Online_Media,

It’s good to know that it works for you. You do not need to change anything if you are already satisfied and that is what you have in mind.

Just keep in mind that the code is just a sample code to get you started with.

If you need anything else we can help you with, don’t hesitate to open another thread.

Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.