0

I have installed the field group module for horizontal tabs, so I can put several nodes in a tab via rendered node.

The question is simple:

How can I hide these tabs on page load? I want to show the links but only when the user clicks on it, the tab shows up.

Thank you for your collaboration.

Gael

7
  • Would you be so kind and give me a link to your module? Are you using field group?
    – Huelfe
    Commented Sep 30, 2015 at 14:39
  • 1
    I'm not familiar with this module, however, this sounds like something that can be solved by inserting javascript into your themes template and then adding an onclick function for the items/tabs you mentioned above. aka, they are always hidden, but when something is clicked on, they are shown.
    – Janpan
    Commented Sep 30, 2015 at 20:19
  • @Huelfe yes my friend, i am using field group. the javascript that controls the tabs is in field_group/horizontal-tabs/horizontal-tabs.js unfortunately I do not have enough skill in tweaking jquery code, so thanks Janpan, I share your idea but I cannot put in practice, you know... Commented Oct 1, 2015 at 9:35
  • @Janpan will you be more tecnique? Commented Oct 1, 2015 at 9:35
  • Read documentation how to use this module. This module provides hiding fields, if they are not in current tab. Either you have an javascript issue or you configured something wrong. Check your browser console if you get some errors.
    – Huelfe
    Commented Oct 1, 2015 at 11:46

1 Answer 1

1

Following @Janpan suggestion, I have hidden the tab content and then added a click function, so I have shown the rendered node inside the div.

here the code:

 $("fieldset").hide();
                $(".tab a").click(function(){
                    $("fieldset").slideDown({
                        direction: "up"
                        }, 300);
                });
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.