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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:09:41+00:00 2026-06-18T01:09:41+00:00

I have a question regarding a tabs script (not jquery ui tabs). I want

  • 0

I have a question regarding a tabs script (not jquery ui tabs). I want to select the tab with a normal text link on top of the page. The tabs are at the bottom of the page. I was hoping this could be achieved with an anchor, but no….

The link:

<a class="reviewslink" href="#reviews">blabla</a>

The script for clicking on the tabs itself:

$('.tabs a').click(function(){
        var tabs = $(this).closest('.tabs');
        var pages = tabs.next();
        tabs.find('a').closest('li').removeClass('active');
        pages.find('.page').removeClass('active');
        $(this).closest('li').addClass('active');
        pages.find('.page.'+$(this).attr('rel')).addClass('active');
        return false;
    });

The HTML:

<div class="tabs">
          <ul>
            <li class="active"><a rel="bestellen" href="#">Test</a></li>
            <li><a rel="ruilen" href="#" name="maattabel">Test1</a></li>
          </ul>
        </div>

        <div class="tabsPages">
         <div class="page bestellen active"></div>
         <div class="page ruilen"></div>
        </div>

I tried this below but that doesn’t work, obvious. I can’t figure out how I should do this.

  $('.reviewslink').click(function() { // bind click event to link

        var tabs = $(this).closest('.tabs');
        var pages = tabs.next();
        tabs.find('a').closest('li').removeClass('active');
        pages.find('.page').removeClass('active');

        tabs.select('select', 3).addClass('active');
        pages.find('.page.reviews.'+$(this).attr('rel')).addClass('active');

        return false;
  });

Any help greatly appreciated.

  • 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-18T01:09:41+00:00Added an answer on June 18, 2026 at 1:09 am

    The example HTML does not seam to be complete and/or consistent, but I think I understand what you are trying to do. How about sending a click event to the tab?

    $('.reviewslink').click(function() {
        var name = $(this).attr('href').substr(1);
        var tab = $('a[name=' + name + ']');
        tab.click();
        return false;
    }
    

    For this code to work you need to add name="reviews" to the a element of the tab that you want to be selected when clicking the link.

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

Sidebar

Related Questions

I have one question regarding using JQuery UI tab control in the asp.net mvc
I have a question regarding the best practise of handling formated text when using
I have a question regarding git repository management. Lets say I want to create
I am making a Rails application and I have question regarding stripping text for
Have a question regarding URL and jQuery. Can I specify URL to tell jQuery
I have a question regarding static libraries. I need to localize some text inside
Hi I have question regarding cin and buffer. I want to make a simple
I am not familiar with eucalyptus and have question regarding the images, instances, clonning
I have a question regarding jQuery's live() function. I am programming a forum. As
I have question regarding the SQLAlchemy. How can I add into my mapped class

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.