Article suggestions
  1. Home
  2. Section: Developer Hub
  3. Add Custom Tabs to Member Profile Pages Using JQuery

Add Custom Tabs to Member Profile Pages Using JQuery

Add Custom Tabs to Member Profile Pages Using JQuery
  • avatar
Written by Chan Nier
Updated on February 19, 2025

 Link: https://support.brilliantdirectories.com/support/solutions/articles/12000095798

This article offers a jQuery code snippet that lets you integrate custom tabs into member profile pages using jQuery.

When clicked, the script adds a corresponding tab and tab pane.

Insert this code at the bottom of the SEO Template or within the Custom Footer Code section under Design Settings.

TIP: 
Unless solely plain text, content inside the "New Tab Content" may probably render more reliably using [widget=shortcode]

Add One Custom Tab

<script>
$(document).ready(function(){
    $('.profile-tabs-nav').append('<li role="presentation"><a href="#divNew" rel="nofollow" aria-controls="tNew" aria-label="New Tab" role="tab" data-toggle="tab" aria-selected="false">New Tab</a></li>');
    $('.tab-content').append('<div role="tabpanel" class="tab-pane" id="divNew">New Tab Content</div>');
});
</script>

Add Multiple Custom Tabs

<script>
$(document).ready(function(){
    $('.profile-tabs-nav').append('<li role="presentation"><a href="#divNew1" rel="nofollow" aria-controls="tNew1" aria-label="New Tab 1" role="tab" data-toggle="tab" aria-selected="false">New Tab 1</a></li>');
    $('.tab-content').append('<div role="tabpanel" class="tab-pane" id="divNew1">New Tab Content 1</div>');
    
    $('.profile-tabs-nav').append('<li role="presentation"><a href="#divNew2" rel="nofollow" aria-controls="tNew2" aria-label="New Tab 2" role="tab" data-toggle="tab" aria-selected="false">New Tab 2</a></li>');
    $('.tab-content').append('<div role="tabpanel" class="tab-pane" id="divNew2">New Tab Content 2</div>');
    
    $('.profile-tabs-nav').append('<li role="presentation"><a href="#divNew3" rel="nofollow" aria-controls="tNew3" aria-label="New Tab 3" role="tab" data-toggle="tab" aria-selected="false">New Tab 3</a></li>');
    $('.tab-content').append('<div role="tabpanel" class="tab-pane" id="divNew3">New Tab Content 3</div>');
});
</script>


Thank you for leaving a rating!
Did you find this article helpful?
0 out of 0 people found this article helpful so far
Can't find what you're looking for? Get in touch
How can we help?
Send your question below and we'll get back to you as soon as possible.
Cancel
translation missing: en.kb.default.contact_form_error
×
Thanks for your message!
Thanks for your message!
×