Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6151205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:44:18+00:00 2026-05-23T19:44:18+00:00

I need to display tabs dynamically based on the users’ permission as some user

  • 0

I need to display tabs dynamically based on the users’ permission as some user will have restriction for list of tabs. How can i do this in Struts2 or do we have any jquery plugin. The tabs can be n number and there can also be child tabs. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:44:19+00:00Added an answer on May 23, 2026 at 7:44 pm

    I am using this jQuery tab plug-in in my application. I have modified the html and jQuery code to display the default tab in order to display tab dynamically like you asked. Here it is what I did

    HTML

    <div class="container">
    
      <ul class="tabs">
    
            <li id="tab1head"><a href="#tab1">First heading</a></li>
            <li id="tab2head"><a href="#tab2">Second heading</a></li>
            <li id="tab3head"><a href="#tab3">Third heading</a></li>
      </ul>
      <div class="tab_container">
    
        <div id="tab1" class="tab_content">
                content of tab1
            </div>
            <div id="tab2" class="tab_content">
                content of tab2
            </div>
            <div id="tab3" class="tab_content">
                content of tab3
            </div>
      </div>
    </div>
    

    jQuery

    call the following function when you want to display a particular tab dynamically

    function someFunction(tabheadID,tabID){
      $("ul.tabs li").removeClass("active");  
      $(".tab_content").hide(); //Hide all content
      $("#"+tabheadID).addClass("active").show(); //tabheadID may be tab1head etc
      $("#"+tabID).show();  //tabID may be tab1 etc
    }
    

    You can dynamically create a tab by using document.createElement() or equivalent jQuery syntax, apply appropriate classes and IDs and thean appending to the container div

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project in which I need a way to display essentially a
I have string which i have to display in TextBlock, my TextBlock have some
I need little bit help related to android tabhost. I have 3 tabs and
I have 4 JQuery Tabs in an ASP.Net MVC 3 appication. All tabs display
I have some tabs that I load the content up via ajax. I am
I need to display an unknown quantity of tabs each with an unknown quantity
I have a list of href / text that I need to make anchors
I need help. I have 6 tabs on website. But when i`m clicking to
i am developing one application with map view i need display the weather depends
I need to display an error message on rejecting a drop in my application.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.