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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:49:03+00:00 2026-06-05T12:49:03+00:00

One thought is that perhaps I should create an array and just .each() all

  • 0

One thought is that perhaps I should create an array and just .each() all of the tabs to create references in the manner I would like but it seems there is probably already a way to do this I just may not be aware of the scope or syntax.

For instance I have $tabs.tabs() and I want to change the AJAX URL and title of a given index such as:

for (var x = index; x < (tab_counter - 1); x++) {  
    $tabs.tabs(x).text(!!$tabs.tabs(x + 1).text() ? $tabs.tabs(x + 1).text() : "Deleted");
    //is there a syntax to refer to tabs in this manner?
}

$tabs has been initialized as
var $tabs = $("#pages").tabs( ...

Assume that tab_counter is kept up to date (it is incremented and decremented in the add and remove events) – If I try as suggested something like

for (var x = 0; x < (tab_counter - 1); x++) {
 console.log($tabs.tabs.eq(x).text() + " @ index " + x);

}

In order to for example loop through all of the tabs titles. Is there something I am missing here in the syntax? eq() seems to be the right solution, but I suspect I am not using it right.

Solution

$tabis = $('#pages ul li a');

for (var x = 0; x < tab_counter; x++) {  
  console.log($tabis.eq(x).text() + " at " + x);
}

/* Prints the text label of each tab within the selected list of tabs. */

Thank you for your help dbaseman thats exactly what I was looking for. And I learned in the process so I am greatful for that

  • 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-05T12:49:04+00:00Added an answer on June 5, 2026 at 12:49 pm

    Use eq perhaps?

    $tabs.eq(x).text( ... )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Should be an easy one. I thought, from reading this blog post that I
I am trying to integrate one application into another and I thought that a
One would expect that even though strings are immutable, value-equality and reference-equality would not
When I started my universal application, I thought the one target option would be
I thought this would be fairly easy, but I'm totally baffled. I want one
An easy one that I am interested in getting your thoughts on: With your
Most of Knockout seems very intuitive. One thing that is strange to me though
I thought one of the best ways to familiarise myself with C/C++, is to
I thought there was only one - included in jQuery UI and documented here
This is a thought problem, and one I have been wrestling with for about

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.