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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:35:48+00:00 2026-05-22T02:35:48+00:00

My code so far: $(function(){ $( #tabs ).tabs().find( .ui-tabs-nav ).sortable({ axis: x }); $(document).ready(function()

  • 0

My code so far:

$(function(){
        $( "#tabs" ).tabs().find( ".ui-tabs-nav" ).sortable({ axis: "x" });                         
        $(document).ready(function() {
            var $tabs = $("#tabs").tabs();
            $('#tabs-1 a').click( function(){
                $tabs.tabs('select', 4); });

});
<div id="tabs">
        <ul>
            <li><a href="#tabs-1">Home</a></li>
          <li><a href="#tabs-2">Alarms</a></li>
            <li><a href="#tabs-3">Access Control</a></li>
            <li><a href="#tabs-4">Services</a></li>
            <li><a href="#tabs-5">Contact Us</a></li>
        </ul>
        <div id="tabs-1">
          <p><span class="bodytext">Check our services</span></p> //want to link to tab 4(services)
          <p><span class="bodytext">
          <a href="#tabs-5">Contact us</a>for free 24hours a day...</span></p>

As you can see from the code when you click on “Contact us” text in tab 1 there is a link to tab 5.
What i want to do is to create a link from “Check our services” to tab 4.
In general to create over 10 links withing tabs linking other tabs

I think i know that i have to change $tabs.tabs('select', 4); to $tabs.tabs('select', id); but i dont know how to call the “id” in html when i want to create my link.
Any suggestions?

  • 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-22T02:35:49+00:00Added an answer on May 22, 2026 at 2:35 am

    I think I would handle this differently using the href on the link itself, perhaps with a class to indicate that it is an intra-tab link, to determine which tab to load and setting up the handlers in the tabs create event.

    $('#tabs').tabs({
         create: function(event,ui) {
             $('a.intra-tab',ui.panel).unbind('click').click( function() {
                var id = Number( $(this).attr('href').replace(/#tabs-/,'') ) - 1;
                $('#tabs').tabs('select',id);
                return false;
             });
         }
    });
    
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">Home</a></li>
            <li><a href="#tabs-2">Alarms</a></li>
            <li><a href="#tabs-3">Access Control</a></li>
            <li><a href="#tabs-4">Services</a></li>
            <li><a href="#tabs-5">Contact Us</a></li>
        </ul>
        <div id="tabs-1">
          <p><span class="bodytext"><a href="#tabs-4" class="intra-tab">Check our services</a></span></p>
        </div>
        ...
    

    You could also do it using live handlers.

    $('#tabs').tabs();
    $('a.intra-tab').live( 'click', function() {
        var id = Number( $(this).attr('href').replace(/#tabs-/,'') ) - 1;
        $('#tabs').tabs('select',id);
        return false;     
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So far i have got the code below which works lovely when trying an
So far I've been using public void run() {} methods to execute my code
I've been reading code complete, not far in yet but one of the things
According to what I have found so far, I can use the following code:
I decided to try http://www.screwturn.eu/ wiki as a code snippet storage utility. So far
We have a very important application, but so far no source code. The application
Code below does not run correctly and throws InvalidOperationExcepiton . public void Foo() {
Code: <html xmlns=http://www.w3.org/1999/xhtml> <head> <title>Unusual Array Lengths!</title> <script type=text/javascript> var arrayList = new Array();
Code I have: cell_val = CStr(Nz(fld.value, )) Dim iter As Long For iter =
Code and preview: <html> <head> <title>Testing some CSS</title> <style type=text/css> .dDay { font-size:205% }

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.