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

  • Home
  • SEARCH
  • 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 8314761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:55:56+00:00 2026-06-08T20:55:56+00:00

Using the jQuery tabs plugin, how would I write a check to see that

  • 0

Using the jQuery tabs plugin, how would I write a check to see that no tabs are selected. Currently I know that .ui-state-active gets set when a tab is active.

How would I go about doing check on page load as well as after each tab click? Ideally I would like a div to appear saying to select an option when no tabs are selected

HTML

<div id="comments-tabs">
                <ul>
                    <li><a href="#Europe">Europe</a></li>
                    <li><a href="#NorthAmerica">North America</a></li>
                    <li><a href="#SouthAmerica">South America</a></li>
                    <li><a href="#Africa">Africa</a></li>
                    <li><a href="#Asia">Asia</a></li>
                    <li><a href="#Oceania">Oceania</a></li>
                    <li class="resetcontinent"><a href="#" class="resetcontinent">reset</a></li>
                </ul>
                <div id="Europe" class="country">
                   Europe
                </div>
                <div id="NorthAmerica" class="country" style="margin:0 0 0 122px;">
                   North America
                </div>
                <div id="SouthAmerica" class="country" style="margin:0 0 0 244px;">
                  South America
                </div>
                <div id="Africa" class="country" style="margin:0 0 0 368px;">
                   Africa
                </div>
                <div id="Asia" class="country" style="margin:0 0 0 490px;">
                   Asia
                </div>
                <div id="Oceania" class="country" style="margin:0 0 0 611px;">
                   Oceania
                </div>
            </div><!--comments-tabs-->

jQuery

$("#comments-tabs").tabs({collapsible: true, selected: -1});
  • 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-08T20:55:57+00:00Added an answer on June 8, 2026 at 8:55 pm

    You can test the selected option which returns the index or -1 if there is no selected tab;

    var nothingSelected = $("#comments-tabs").tabs("option", "selected") === -1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jquery UI tabs and want to know that , is it
Using jQuery UI , I have a tabs plugin and within tab 1 gets
I'm using the jquery tabs plugin and want to have the background a light
I'm using jQuery UI's Tabs plugin with a asp.net (webform) application. As there are
I'm using jQuery tabs. In one of the tabs is a wysiwyg editor that
I have a page that is using jQuery tabs. Within one of my tabs
I would like to develop a site using jQuery that will work with all
I using Jquery tabs plugin to have tabs in my view. I want <li><a
I'm using the jQuery Tabs UI along with the jQuery Cookie plugin from GitHub.
I'm making a website using the jQuery UI Tabs plugin which is great. However,

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.