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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:29:16+00:00 2026-06-16T23:29:16+00:00

Okay guys what I would like to happen is initialize the jQuery Tool plugin

  • 0

Okay guys what I would like to happen is initialize the jQuery Tool plugin only after one of the anchor tags has been clicked on.

This is what I have in my JS file:

$(".tab-1-tabs ul").tabs("div.tab-1-container > div");

** This is the HTML that gets generated after the script above is called:**

<li><a href="#" class="service current">1</a></li>
<li><a href="#" class="service">2</a></li>
<li><a href="#" class="service">3</a></li>
<li><a href="#" class="service">4</a></li>

The problem with the generated HTML is that there is a class of current that gets injected when the plugin loads and I have CSS styling in place that gives that anchor tag a certain background image that shows it’s active. I am also hiding the content of that particular tabs pane.

This is what I think I can do but does not work:

$(".tab-1-tabs ul").tabs("div.tab-1-container > div", { onBeforeClick: function(event, tabIndex) {
        $('.tab-1-tabs ul li a').removeClass('current');
    }
});

I would like to have the page load without the tab functionality loading that applies the current class but instead only load when one of those list items get clicked only then will current get applied to the anchor tag.

I want to give the impression that nothing has been selected unless they click on any of those anchor tags.

Or maybe something like:

$('#link').click(function(e) {
    e.preventDefault();
    $(".tab-1-tabs ul").tabs("div.tab-1-container > div");
});
  • 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-16T23:29:18+00:00Added an answer on June 16, 2026 at 11:29 pm

    I think you’re looking for something like this:

    $("#link").click(function (){
      $.getScript("somescript.js", function(){
       console.log("loaded script");
     });
    });
    

    When your link is clicked, $.getScript will load in the script.

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

Sidebar

Related Questions

Okay guys, I would like to know the following comments I made in this
Okay guys, I have read through all the other posts and question on jQuery
Okay guys, I am working hashmap, using one of my classes as Key. My
Hey guys I'm a noob to jquery and I've heard it's okay to mix
Okay, since none of you guys like my question, let me rephrase it. User
Okay guys, I'm sure this has a very simple solution but my searches are
Okay guys, maybe you can help me out with this one. I'm about ready
Possible Duplicate: How Turn on only Camera flash light programmatically in android? okay guys,
Okay guys, After many readings and finding solutions down here I just need to
Okay guys, I have been scratching my head like mad over this issue and

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.