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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:52:16+00:00 2026-05-26T20:52:16+00:00

I have the following tabs on certain div on my page: (this code is

  • 0

I have the following tabs on certain div on my page: (this code is generated dynamically based on predefined conditions, so the content will never be the same, the only thing that I know is that there will always be a tabsContainerDiv to initialize the control)

<div id="parentContainer">
    <div id="tabsContainerDiv">
        <ul>
            <li><a href="#page1">Pag. 1-</a></li>
            <li><a href="#page2">Pag. 2-</a></li>
        </ul>

        <div id="page1" name="page1">
            <span style="left:120px; top:4px" class="Label" id="Pg1Cap1">TITLE</span>
            <span style="left:1056px; top:4px" class="Label" id="Pg1Cap2"></span>
            <span style="left:216px; top:28px" class="Label" id="Pg1Cap3">OTHER CONTENT</span>
            <span style="left:1056px; top:28px" class="Label" id="Pg1Cap4"></span>
        </div>
        <div id="page2" name="page2">
            <input type="text" readonly="readonly" maxlength="10" size="10" class="Field" id="object_identifier" />
        </div>

    </div>
</div>

Then, I initialize the UI and it works perfect:

$('#tabsContainerDiv').tabs();

Now, I need to COPY those TABS into a div on a Dialog control, I already have there another div, so I do this:

$('#htmlEditor').html($('#parentContainer').html());

And that also works, in the way that it copies the Tabs content (also including the classes that jquery UI adds to make it look like a TAB structure), the problem is that I wish I could copy the TABS including the behaviour, I mean, without needing the re-create the tabs with $('#tabsContainerDiv').tabs();,

Is there a way to do this? maybe using the .live() or something to say: every time we detect the presence of an element with the id tabsContainerDiv, attach the .tabs() event.

Any help or suggestion would be appreciated. Thanks.

  • 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-26T20:52:17+00:00Added an answer on May 26, 2026 at 8:52 pm

    Try using clone(). It has a parameter to specify whether it should include the events when cloning elements.

    var tabs = $('#parentContainer #tabsContainerDiv').clone(true);
    $('#htmlEditor').append(tabs);
    

    Depending on the plugin this may cause issues where it sees both sets of tabs as one. You may still be best off with your current method.

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

Sidebar

Related Questions

I have following code in my php page. These are two tabs Inbox and
I have the following code to generate Jquery UI tabs: <div id=tabs-loading-message style=display:none>Loading, Please
In the page ?p=u I have the following tabs: <div id='tabs' class='ui-tabs'> <ul class='ui-tabs-nav'>
I have the following code for creating tabs. It works at the end of
I have using the following code for developing tabs. $(document).ready(function() { $('#container-1').tabs(); } ....
I have a master page with tabs. The tabs are defined by the following
I have the following JQuery Code concerning my tabs : $(#onglet>ul>li).click(function(){ $(#onglet ul li).removeClass('Selectionne').addClass(OngletPrincipal);
I have the following code in my background script: chrome.tabs.onUpdated.addListener(function(tabId, changeinfo, tab) { if
I have the following structure, the #tabs div is a static positioned div. I
Hy , I have the following code for mai tabs ... $(document).ready(function() { $(#continut_right

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.