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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:40:36+00:00 2026-06-09T15:40:36+00:00

I am having a problem with a link that sits inside of a div

  • 0

I am having a problem with a link that sits inside of a div on my page. Currently, when the link is clicked, nothing happens. I do not understand why, but I imagine it has to do with the use of hide() and show() on the containing div which I will explain below.

The div is part of a custom “accordion” which uses the following Jquery to open/close the proper div’s when a header is clicked:

   $('.accordion .head').click(function () {
     $('.accordion .head').next().hide();
     $('.accordion .head').removeClass("active");

     $(this).next().show('fast');
     $(this).addClass("active");
     return false;
});

I understand that there are better ways to achieve the “accordion” behavior, but because this is used across our website I do not have the option of updating the accordion to use the actual Jquery accordion() method without making a lot of extra work for myself.

So, given the sample code below can anybody help me understand what the problem is here, or how to overcome it?

<div class="accordion">
  <div class="head active"><a href="#">Heading 1</a></div>
  <div class="accordion-content first">
      <p>
           Some text here
      </p>
      <div class="accordion-logos"> 
      </div>
  </div>            
  <div class="head"><a href="#">Heading 2</a></div>
  <div class="accordion-content">
      <p>
          Some other text here 
      </p>
      <p>
          <a href="http://www.google.com">http://www.google.com</a>                                    
      </p>
  </div>            
</div>

I can’t even get the click to register when I handle it specifically, the alert in the code below never fires when the link is clicked:

  $('.accordion .accordion-content #thelink').click(function () {
    alert();
  });

Thank You,

Rose

  • 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-09T15:40:38+00:00Added an answer on June 9, 2026 at 3:40 pm

    Seems I misunderstood you the first time around.

    If the google link doesn’t fire then there is either something blocking a links, overwriting the href of the links or maybe even another element is in front of it and you can’t click the link.

    If someone wanted to block the link to work they could do something like this:

    $('.accordion .accordion-content a').click(function(){
        return false;
    });
    

    If you want to check if that is the case you can try unbinding everything and check if you can click the link then:

    $('.accordion .accordion-content a').unbind('click');
    

    Also check your html output to see what the href value is set to, maybe someone has overwritten it.

    Just go to the rendered page and right-click and select view-source. Search for the google link and check the href value.

    ​

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

Sidebar

Related Questions

Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how
I am having problem with appending a div with an image to a page
I am having a problem in that a style is not being applied when
I'm having a weird problem. I have a div that is hidden via css
The problem I am having is when I click the link that submits the
I have link that opens a window, with window.open(mytest.aspx); the problem i am having
I have a flash file menu i am having problem while link it to
I'm new to PHP and I'm having a problem when trying to link my
I was advised to used this because i was having a problem, a link
I'm currently working on a problem that basically involves processing all data in a

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.