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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:38:11+00:00 2026-05-26T20:38:11+00:00

i have some simple jquery tabs: <script> $(function() { $( #tabs ).tabs(); }); </script>

  • 0

i have some simple jquery tabs:

<script>
$(function() {
    $( "#tabs" ).tabs();
});
</script>
<div class="demo">
<div id="tabs">
<ul>
    <li><a href="#tabs-1">Nunc tincidunt</a></li>
    <li><a href="#tabs-2">Proin dolor</a></li>
    <li><a href="#tabs-3">Aenean lacinia</a></li>
</ul>
<div id="tabs-1">
        <ul>
    <li>
            <div><?php id='123'; ?></div>
    <a id="test" class="link-image1" href="#tabs-2?id=123">test</a>
            </li>

    <li>
            <div><?php id='234'; ?></div>
    <a id="test" class="link-image2" href="#tabs-2id=234">test</a>
            </li>
    </ul>

</div>
<div id="tabs-2">
            <?php if(isset($_GET['id'])){ echo $_GET['id']; } ?>
            <div id="placeholder"></div>
</div>
<div id="tabs-3">
    <p>Mauris eleifend est et turpis. Duis id erat.</p>
</div>
</div>
</div>

what i want is to pass a variable, id, to some other tab.

I’m not concern with making the tabs work, in case they don’t, but only on passing that variable

is this possible?

edit:
i have this javascript:

$(".link-image").click(ajax_request);
$('#placeholder').load("/test.php?id=1234556");

the idea is that when i click on .link-image link i will change the tab and send a ajax request to load something there, but i need to pass the id variable with it

edit:

when i click on link-image1 i want to pass the id from the same li and so on

  • 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-26T20:38:12+00:00Added an answer on May 26, 2026 at 8:38 pm

    You can use $(this).attr('href') to get the href attribute.

    $(".link-image").click(function(){
        var link = $(this).attr('href');        // Example #tabs-2?id=123
        var id = link.match(/id=(\d+)/)[1];     // Matches 123
        // continue with your function logic
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some simple jQuery toggle script like this: <script type=text/javascript> $(document).ready(function() { $('#clickedit').click(function()
I have created a simple JQuery script with hovering effect on some links. The
If for example, I have some jQuery doing something simple like: $(div).fadeIn('fast'); $(div).html('Foo'); That
I have some very simple jquery as listed below: $(.block).hover(function(){ $(.drag).stop().fadeIn(1000); }, function(){ $(.drag).stop().fadeOut(1000);
I have written some simple jquery code : function Generate(result, counter) { $(#ArchivesContent).append( <table
I have some simple jQuery code: var response = Array() $('.task-list').each(function() { response.concat(response,$('#' +
I have some content sliding here. http://www.smallsharptools.com/downloads/jQuery/Slider/slider.html The HTML structure is simple. There is
I have some simple markup: <table> <tr> <td>Menu Item</td> </tr> </table> <div> <table> <tr>
I have a jQuery based tabs which i got from some blog.So now when
I have some simple HTML: <div id=selectorContainer> <div id=chainedSelector style=display: none;><% Html.RenderPartial(ProjectSuggest/ChainedProjectSelector); %></div> <div

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.