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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:08:47+00:00 2026-05-24T14:08:47+00:00

How can I set jQuery’s ajax tab’s url dynamically in runtime? Doing like this:

  • 0

How can I set jQuery’s ajax tab’s url dynamically in runtime?

Doing like this:

$(function() {
    //$("#tabs").tabs();
    $("#tabs").tabs("url" , 0, "dep.php" );
});

html

<div class="flts">
    <div id="tabs">
        <ul>
            <li><a href="dep.php">Вылеты</a></li>
            <li><a href="arr.php">Посадка</a></li>
        </ul>
    </div>
</div>

but it’s not working! What could be a problem?

  • 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-24T14:08:48+00:00Added an answer on May 24, 2026 at 2:08 pm

    Your approach doesn’t seem correct. The call of $("#tabs").tabs("url" , 0, "dep.php") is wrapped in $(function() {, so it’s run only the first time the page is loaded. That makes no sense. This method is used to later replace the tab content.

    The correct is approach is:

    • The page should only contain the tab label with a valid link but no tab content.

    • When the page is first loaded, call $("#tabs").tabs(); to intialize and configure the tab widget.

    The tab widget is now usable and the tab content is loaded when the specific tab is displayed for the first time (lazy loading).

    • If you want to refresh or replace a tab later (e.g. from an event handler), call $("#tabs").tabs("url" , 0, "dep.php").

    So the overall solution could look like this:

    <div class="flts">
      <div id="tabs">
        <ul>
          <li><a href="dep.php">Вылеты</a></li>
          <li><a href="arr.php">Посадка</a></li>
          </ul>
        </div>
    </div>
    
    $(function() {
        // intial tabs configuration
        $("#tabs").tabs();
        // event handler setup for refresh
    
        $('#refreshButton').click(function() {
          $("#tabs").tabs("url", 0, "dep.php?var=val&var2=val");
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using jQuery , how can I dynamically set the size attribute of a select
How can you set a limit on the result from the jQuery autocomplete? This
I think that you can set like on post and get methods in jquery
Let's say by using jQuery I can set the width of a DIV doing
How can I access options that I set in a jQuery Datepicker? $(#testDatePicker).datepicker({ minDate:
Can Jquery zebra stripe a table where some rows are being set to 'display:none'
how can we make the jQuery plugnin to return the wrapped set?so that using
How can I, using jQuery, set the next item of an already selected item
I can set data in JTable constructor, and then user can change this data
How I can set a style of a:visited with JavaScript or jQuery. I know

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.