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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:18:24+00:00 2026-06-05T10:18:24+00:00

I have a bunch of buttons that could create a new jQuery UI tab.

  • 0

I have a bunch of buttons that could create a new jQuery UI tab. What I want to happen is when one is clicked only one tab is open at a time. So when another button is clicked that tab is replaced with the new tab and the other tab closes. What is the best way to accomplish this. My code is below:

here is my html:

<div id="tabs">
            <ul>
                <li>
                    <a href="#tabs-1">My Messages</a>
                </li>
                <li>
                    <a href="#tabs-2">My Plan Messages</a>
                </li>
                <li>
                    <a id="overdueInquiriETab" href="#tabs-3">Overdue Messages</a>
                </li>
                <li>
                    <a href="#tabs-4">Advance Search Results</a>
                </li>
            </ul>
            <div id="tabs-1">
                <table id="myMessages">
                </table>
                <div id="myMessagesPager">
                </div>
            </div>
            <div id="tabs-2">                                            
                        <table id="allMessages">
                        </table>
                        <div id="allMessagesPager"></div>
            </div>
            <div id="tabs-3">
                <table id="overdueTable">
                </table>
                <div id="overduePager">
                </div>
            </div>
            <div id="tabs-4">
                <table id="advanceSearchTable">
                </table>
                <div id="advanceSearchPager">
                </div>
            </div>
        </div>

here is my javascript

$('#quickInquirySearch').click(function (e) {
    e.preventDefault();
    //$('#tabs li:eq(2)').show();
    $("#tabs").tabs('add', 'content/2223346read.html', 'Message ID:2223346 ');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#modalAdvanceInquirySearch').click(function (e) {
    e.preventDefault();
    $('#tabs li:eq(3)').show();
    $('#tabs').tabs('select', 3);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
    $("#searchPanel2").dialog("destroy");
});
$('#MMA1').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223345.html', 'Message ID:2223345 ');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#MMA3').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223344.html', 'Message ID:2223344');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#MMA5').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223343.html', 'Message ID:2223343');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#MMA7').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223342.html', 'Message ID:2223342');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#MMA9').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223341.html', 'Message ID:2223341');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#inTaA1').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223347read.html', 'Message ID:2223347');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#inTaA3').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223344read.html', 'Message ID:2223344');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});

$('#inTaA5').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223343read.html', 'Message ID:2223343');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#inTaA7').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223342read.html', 'Message ID:2223342');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#inTaA9').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223341read.html', 'Message ID:2223341');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#inProA1').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223347read.html', 'Message ID:2223347');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#inProA3').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223344read.html', 'Message ID:2223344');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#inProA5').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223343read.html', 'Message ID:2223343');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#inProA7').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223342read.html', 'Message ID:2223342');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#inProA9').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223341read.html', 'Message ID:2223341');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#clTa1').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223347read.html', 'Message ID:2223347');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#clTa3').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223344read.html', 'Message ID:2223344');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#clTa5').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223343read.html', 'Message ID:2223343');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#clTa7').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223342read.html', 'Message ID:2223342');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#clTa9').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223341read.html', 'Message ID:2223341');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#AM1').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223344read.html', 'Message ID:2223344');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#AM3').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223345read.html', 'Message ID:2223345');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#AM5').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223347read.html', 'Message ID:2223347');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#AM7').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223342read.html', 'Message ID:2223342');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#AM9').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223341read.html', 'Message ID:2223341');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#oveTa1').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223347read.html', 'Message ID:2223347');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#oveTa3').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223344read.html', 'Message ID:2223344');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
}); 
$('#oveTa5').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223343read.html', 'Message ID:2223343');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
}); 
$('#oveTa7').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223342read.html', 'Message ID:2223342');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
}); 
$('#oveTa9').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223341read.html', 'Message ID:2223341');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#advSe1').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223347read.html', 'Message ID:2223347');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#advSe3').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223344read.html', 'Message ID:2223344');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#advSe5').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223343read.html', 'Message ID:2223343');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#advSe7').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223342read.html', 'Message ID:2223342');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});
$('#advSe9').live('click', function (e) {
    e.preventDefault();
    $("#tabs").tabs('add', 'content/2223341read.html', 'Message ID:2223341');
    $('#tabs').tabs('select', 4);
    $('li:eq(0) a:eq(1)').remove();
    $('li:eq(1) a:eq(1)').remove();
    $('li:eq(2) a:eq(1)').remove();
});    
  • 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-05T10:18:25+00:00Added an answer on June 5, 2026 at 10:18 am

    Here is what I did to make the replace an existed tab I dynamically created with a new tab I am dynamically creating the code is below:

    $('#advanceSearchView1').click(function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223346.html', 'Message ID:2223346 ');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#quickInquirySearch').click(function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223346read.html', 'Message ID:2223346 ');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#modalAdvanceInquirySearch').click(function (e) {
        e.preventDefault();
        $('#tabs li:eq(3)').show();
        $('#tabs').tabs('select', 3);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $("#searchPanel2").dialog("destroy");
        $('#tabs li:eq(3) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#MMA1').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223345.html', 'Message ID:2223345 ');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#MMA3').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223344.html', 'Message ID:2223344');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#MMA5').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223343.html', 'Message ID:2223343');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#MMA7').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223342.html', 'Message ID:2223342');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#MMA9').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223341.html', 'Message ID:2223341');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#inTaA1').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223347read.html', 'Message ID:2223347');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#inTaA3').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223344read.html', 'Message ID:2223344');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    
    $('#inTaA5').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223343read.html', 'Message ID:2223343');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#inTaA7').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223342read.html', 'Message ID:2223342');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#inTaA9').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223341read.html', 'Message ID:2223341');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#inProA1').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223347read.html', 'Message ID:2223347');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#inProA3').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223344read.html', 'Message ID:2223344');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#inProA5').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223343read.html', 'Message ID:2223343');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#inProA7').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223342read.html', 'Message ID:2223342');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#inProA9').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223341read.html', 'Message ID:2223341');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#clTa1').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223347read.html', 'Message ID:2223347');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#clTa3').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223344read.html', 'Message ID:2223344');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#clTa5').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223343read.html', 'Message ID:2223343');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#clTa7').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223342read.html', 'Message ID:2223342');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#clTa9').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223341read.html', 'Message ID:2223341');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#AM1').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223344read.html', 'Message ID:2223344');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#AM3').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223345read.html', 'Message ID:2223345');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#AM5').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223347read.html', 'Message ID:2223347');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#AM7').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223342read.html', 'Message ID:2223342');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#AM9').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223341read.html', 'Message ID:2223341');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#oveTa1').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223347read.html', 'Message ID:2223347');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#oveTa3').live('click', function (e) {
        e.preventDefault();
        $("#tabs").tabs('add', 'content/2223344read.html', 'Message ID:2223344');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#oveTa5').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223343read.html', 'Message ID:2223343');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#oveTa7').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223342read.html', 'Message ID:2223342');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#oveTa9').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223341read.html', 'Message ID:2223341');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#advSe1').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223347read.html', 'Message ID:2223347');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#advSe3').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223344read.html', 'Message ID:2223344');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#advSe5').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223343read.html', 'Message ID:2223343');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#advSe7').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223342read.html', 'Message ID:2223342');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    $('#advSe9').live('click', function (e) {
        e.preventDefault();
        $('#tabs ul li:eq(4)').remove();
        $("#tabs").tabs('add', 'content/2223341read.html', 'Message ID:2223341');
        $('#tabs').tabs('select', 4);
        $('#tabs ul li:eq(0) a:eq(1)').remove();
        $('#tabs ul li:eq(1) a:eq(1)').remove();
        $('#tabs ul li:eq(2) a:eq(1)').remove();
        $('#tabs ul li:eq(4) a:eq(1)').click(function (e) {
            e.preventDefault();
            $('#tabs').tabs('select', 0);
            $('#tabs ul li:eq(0) a:eq(1)').remove();
            $('#tabs ul li:eq(1) a:eq(1)').remove();
            $('#tabs ul li:eq(2) a:eq(1)').remove();
        });
    });
    

    If anyone knows a better way to write this please fill free to let me know.

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

Sidebar

Related Questions

I have a map with a bunch of buttons that show and hide container
So I have a bunch of buttons on a page, interspersed with other HTML,
I have a bunch of generic code that is used a lot, which i'd
I have a bunch of python methods that follow this pattern: def delete_session(guid): conn
I'm pretty new to JQuery so I made my own light box that comes
I have a UIViewController subclass that loads a bunch of images for each cell
I have a script that that cycles through a bunch of list-items; adding/removing to
I have 5 buttons named opt1, opt2, opt3, etc. If I want to hide/show/do
I have written a script that goes through a bunch of files and snips
We have a set of applications that basically display a bunch of bitmaps and

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.