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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:44:08+00:00 2026-06-14T04:44:08+00:00

I am trying to open the last tab in a jQuery Tabs on DOM

  • 0

I am trying to open the last tab in a jQuery Tabs on DOM ready but the solutions I have found online do not seem to be working. I am using vertical tabs as per the example in the jQuery UI Demo site.

JS –

$( "#personnelStats_tabs" ).tabs().addClass( "ui-tabs-vertical ui-helper-clearfix" );
    $( "#personnelStats_tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );

CSS –

.ui-tabs-vertical { width: 55em; }
.ui-tabs-vertical .ui-tabs-nav { padding: .2em .1em .2em .2em; float: left; width: 12em; }
.ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }
.ui-tabs-vertical .ui-tabs-nav li a { display:block; }
.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; }
.ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: right; width: 40em; }
  • 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-14T04:44:09+00:00Added an answer on June 14, 2026 at 4:44 am

    Thanks for the help, everyone. Unfortunately, I was not specific enough in my question (wrote it in too much of a hurry) and the solution was not given here. However, a link to a similar post from 2009 that I somehow missed and the use of .last() helped me find a solution:

    $(document).ready(function() {
        //Initiate jQuery Tabs
        var $tabs = $( "#personnelStats_tabs" ).tabs();
        //Get the index of the last tab
        var last = $(".ui-tabs-nav li").last().index();
        //Add hack for vertical tabs
        $tabs.addClass( "ui-tabs-vertical ui-helper-clearfix" );
        $( "#personnelStats_tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );
        //Select the last tab
        $tabs.tabs("select", last);
    });
    

    Thanks folks! +1 to all of you

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

Sidebar

Related Questions

I´m trying to open a tab using jquery, here is my code: $(#ecContenedorFolders).tabs({ tabTemplate:
I'm trying to open video player in windows 7 with PHP but can't seem
Basically I'm trying to 'remember' in my app which tab was last open when
I'm trying to open a file and read from the last point read. My
I'm trying the open a relative path in Ubuntu , but after opening the
I'm trying to open a zip file with jython using FileInputStream and ZipInputStream. But
I'm a complete noob to jquery and jquery ui but have successfully implemented a
i'm trying to open an url http://الاعلي-للاتصالات.قطر/ar/news-events/event/future-internet-privacy with the urllib2.urlopen but it reports always
I'm trying to retrieve the last updated date from a cube. I have a
I have a table (jqGrid) inside one of the jquery ui tabs (the first

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.