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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:10:58+00:00 2026-05-30T22:10:58+00:00

I have a jquery tab on my page, where each list item contains a

  • 0

I have a jquery tab on my page, where each list item contains a hyperlink that should get called whenever someone changes tab (it’s a webservice call that fills in values within the tab).

I can accomplish this behaviour when changing tabs, but now I also want the first hyperlink to be called when the .tabs function is called (for initialisation purposes)

How can I do this? Calling this at the end of the page doesn’t work:

setTimeout(function() {$('#tabs').tabs('select', 0);}, 0);

Probably because just calling .tabs() already selects the first tab.

My tabs code (js + asp.net):

<div id="tabs" class="tab-panel">
    <ul class="tabs">
        <asp:Repeater ID="rpt" runat="server">                
            <ItemTemplate>
                <li>
                    <asp:HyperLink ID="btnEdit" runat="server" NavigateUrl="myPage.aspx/GetInfo" Text='<%# Eval("Name") %>'></asp:HyperLink>
                    <asp:HiddenField ID="txtId" runat="server" Value='<%# Eval("ID") %>' />
                </li>
            </ItemTemplate>
        </asp:Repeater>
    </ul>
    <div class="tab rounded-bottom rounded-topright">
        <div class="tab-content" id="licRights">
            <input type="text" value="" id="myText">
        </div>
    </div>
</div>

Javascript:

$("#tabs").tabs({
    select: function (event, ui) {
        var Id = $(ui.tab).siblings("input").val();
        var settings = $(this).tabs("option", "ajaxOptions");
        settings.data = $.toJSON({ id: Id });
    },
    ajaxOptions: {
        success: function (response) {
            $("#myText").val(response.d);                        
        }
    }
});
  • 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-30T22:10:59+00:00Added an answer on May 30, 2026 at 10:10 pm

    The select event is triggerred when a tab is clicked, not programmatically changed. That is what the documentation says actually.

    select
    This event is triggered when clicking a tab.

    You can see this in action here: only the “show” event is triggerred initially


    What you can do is trigger a click on the first tab:

    1. set the defaul selection to ” -1 “, so no tab is initially selected (otherwise the programmatic click has no effect)
    2. find the first anchor and trigger a click event

    Here’s the code:

    $("#tabs").tabs({
        selected: -1,
        ...
    }).find('.ui-tabs-nav a:first').click()
    

    DEMO

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

Sidebar

Related Questions

I have group of jQuery Tabs that are created dynamically. Each tab has an
I'm experimenting with the jQuery UI tab control, and have three tabs that each
I have two tabs in my home page and each tab has one jquery
I have a jQuery tab, and this is my code: $(document).ready(function() { //When page
I have an asp.net mvc partial which contains a jquery ui tab control, marked
I am using jqgrid. My page has three tabs and each tab contains a
I have some html and JQuery that is used to create a page with
I have a 'tabbed' style web page where once the page loads each tab
I am using jQuery UI tabs. I have 10 tabs, and each tab holds
i have a list of items A and each item A have some items

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.