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 9070729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:45:25+00:00 2026-06-16T17:45:25+00:00

I have a dynamic jQuery function where i add jquery tabs dynamically. It produces

  • 0

I have a dynamic jQuery function where i add jquery tabs dynamically. It produces HTML like below

<div id="chattabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
    <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
        <li class="ui-state-default ui-corner-top" id="some_7"><a href="#ui-tabs-2"><span>Tsefolasha Sefolasha</span></a></li>
        <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active" id="some_9"><a href="#ui-tabs-4"><span>Emaynor Maynor</span></a></li>
    </ul>
    <div id="ui-tabs-2" class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide">
        <ul id="messagelist_7">
        </ul>
    </div>
    <div id="ui-tabs-4" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
        <ul id="messagelist_9">
        </ul>
    </div>
    <input type="text" value=" " id="msg">
    <input type="button" value="send" id="send">
    <div id="ui-tabs-1" class="ui-tabs-panel ui-widget-content ui-corner-bottom"></div>
    <div id="ui-tabs-3" class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"></div>
</div>

Now I need to add content to each of the tabs when the users clicks the button send at the bottom . something like

$('#message_9').append('<li>' + message + '</li>');

How can I do that?

Also, how can I get this id from outside of chattabs div?

  • 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-06-16T17:45:26+00:00Added an answer on June 16, 2026 at 5:45 pm

    You can use the activate event when you initialize your tabs.

    $( "#chattabs" ).tabs({
        activate: function( event, ui ) {
    
            //Append something to the active tab
            ui.newPanel.append();
    
            //Get the active tab`s nested ul
            var ul = ui.newPanel.find('ul');
    
            //Get the id of the active tab's nested ul
            var ul_id = ul.attr('id');
    
    
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have dynamic content in a div called txtresults like this: <div id=txtresults></div> This
I have jquery mobile site, trying to add a gmap (v3) with dynamic markers:
I have done with adding and removing dynamic rows in html, jquery. jsfiddle.net/gansai/p5QwC/1/ HTML:
I would like to add dynamic content to a JQuery Accordion container. My code
i create a div dynamically and add this dynamic div into another div. i
I would like to use jquery to build a dynamic add/ remove form. IT
I have created a dynamic list picker script using Jquery 1.3 and PHP that
I'm working with a dynamic DOM here, and have called the jQuery UI datepicker
I have some divs that have dynamic heights controlled by a 'click' function as
I have some divs that have dynamic heights controlled by a 'click' function as

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.