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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:22:11+00:00 2026-06-04T01:22:11+00:00

I use JQueryUI TABS plugin. There is my tabs structure. <div id=tabs> <ul> <li><a

  • 0

I use JQueryUI TABS plugin.

There is my tabs structure.

<div id="tabs">
  <ul>
    <li><a href='#tabs-1'>TabGroup1</a></li>
    <li><a href='#tabs-2'>TabGroup2</a></li>            
  </ul>
  <div id='tabs-1'>
    <a href='tab1_link1.html'>TabGroup1-link1</a>
    <a href='tab1_link2.html'>TabGroup1-link2</a>
  </div>
  <div id='tabs-2'>
    <a href='tab2_link1.html'>TabGroup2-link1</a>
    <a href='tab2_link2.html'>TabGroup2-link2</a>
  </div>
</div>

I use such code to select and load first link in tab, when tab is selected.
It works itself.

$(function() {
    $( "#tabs" ).tabs();

        // Activate first link on tab
    $( "#tabs" ).bind( "tabsselect", function(event, ui) {
     window.location.href = $(ui.panel).find('a:first').attr('href');
   });  
});

BUT in my task addition code for selecting tab by URL parameters strongly nessesary.
So if visitor opened link from second tab-group, second tab must be showed opened, not default first one.*

I have working code which show correct tab when link from this tab is loaded (no AJAX or such, just ussual links). $URL['part'] is variable I recieve from my URL in engine, this works fine separately.

<?php if(@$URL['part']=='part2'){
    echo '<script>$(function() { $("#tabs").tabs("select","#tabs-2"); });</script>';    
} ?>

BUT when I use both these code-blocks it cause page repeatedly infinite reload 🙁

UPDATED:

Notice, that both of blocks of code use SELECT event, that why the looping occurs.

UPDATED2:

I suppose, if use ONCLICK for loading link when tab is selected, and SELECT on activation tab due to URL settings, it can solve the problem. But I don’t know how to write this in code.

  • 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-04T01:22:12+00:00Added an answer on June 4, 2026 at 1:22 am

    This is complete final solution I found, which WORKS (crossbrowser)!

    Creates tabs

    $(function() {
        $( "#tabs" ).tabs();
    });
    

    Select the tab which must be active for the current URL we have

    <?php 
    if(@$URL['part']=='part1'){
        echo '$(function() { $("#tabs").tabs("select","#tabs-1"); });'; 
    } 
    if(@$URL['part']=='part2'){
        echo '$(function() { $("#tabs").tabs("select","#tabs-2"); });'; 
    } 
    ?>
    

    The below code MUST be after we started tabs and selected which one is now active, otherwise we will recieve infinite url-reloading!

    $(function() {
        $('#tabs').tabs({
            select: function(event, ui) {
                window.location.href = $(ui.panel).find('a:first').attr('href');
            }
        });
    });
    

    So, when I moved tab selection based on URL to the begining of code, this solved all the issues and make solution this simple!

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

Sidebar

Related Questions

At http://docs.jquery.com/UI/Tabs#Example there is a short HTML example of how to use JQuery UI
I am trying to make use of jQueryUI AJAX tabs in my ASP.Net Webforms
I'd like to use jquery ui tabs plugin, but not have it changing the
I use jqueryui-tabs to display a tabbed UI. here is how my markup looks
I'm trying to use jQueryUI tabs, loading the Tabs via AJAX. The problem I'm
I want to use jQuery Validation Plugin with jQuery UI Tabs . How I
I use jquery ui tabs http://jqueryui.com/demos/tabs/#default and i allow the user to create a
I am going to use JQuery UI Tabs Plugin on my web application. And
I want to use jqueryui tabs widget in ajax requested page. In my site
I use jQueryUI's tabs and when a user changes a form in the tab,

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.