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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:38:08+00:00 2026-05-25T00:38:08+00:00

I have a clickable div and within that div is link. When the link

  • 0

I have a clickable div and within that div is link. When the link is hovered the text changes via css a:hover. For some reason I can seem to figure out to apply that hover to the whole div. Here is my code.

JQuery for making the div clickable:

$("div.clickable").click(
function()
{
    window.location = $(this).attr("url");
    return false;
});

HTML

<div class="clickable" url="/galleries/Current_exhibits.aspx">
<p><a href="URL">TEST</a></p>
</div>

I’d like to add a simple a:hover {color: #000;} effect to the whole div but am having trouble. Any pointers?

  • 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-25T00:38:09+00:00Added an answer on May 25, 2026 at 12:38 am

    Just apply :hover to the div:

    .clickable:hover,
    .clickable:hover a:link
    {
        color: #000;
    }
    

    I applied it to the link as well, as you’ll likely have to do.

    http://jsfiddle.net/M3fw2/

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

Sidebar

Related Questions

I have a link inside a div that floats to the right of the
I currently have a table with rows that contain a clickable link. When a
I'd like to know how i can render a div clickable (like a link,
I have a div that I want to be clickable but I need a
I need some jQuery ajax help. I currently have a main content div that
I have a DIV with many elements that are all clickable. Each one with
I have a page with some clickable <div> elements, and I want to change
I am trying to have a clickable div so that when its clicked it
I would like to have formatted, clickable text and images inside a selected UITableViewCell.
I have a big div with some links inside, I'd like to have the

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.