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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:50:46+00:00 2026-05-25T18:50:46+00:00

I have divs I need to wrap in an anchor tag with href=# on

  • 0

I have divs I need to wrap in an anchor tag with href=”#” on hover and remove when the mouse leaves.

When you hover on ps_image it wrap ps_img with <a href="#">DIV HERE</a>
Then unwrap when not hovering.

<div class="ps_image">
    <div class="ps_img">
        <img src="albums/album1/thumb/thumb.jpg" alt="Dachshund Puppy Thumbnail"/>
    </div>
</div>

p.s. doesn’t matter if it only wraps the the child div, but would be nice
Basically I’m trying to get the cursor to be the index pointer, without it linking

  • 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-25T18:50:47+00:00Added an answer on May 25, 2026 at 6:50 pm

    That sounds like a terrible idea, but…

    $('.ps_image').each(function() {
        var psImg = $(this).find('.ps_img'),
            a;
        $(this).hover(function() {
            a = psImg.wrap('<a href="#" />').parent();
        }, function() {
            a.children().unwrap();
        });
    });
    

    jsFiddle.

    However, you probably have a misunderstanding of CSS. If you want the image to create a cursor, add cursor: pointer to its CSS selector.

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

Sidebar

Related Questions

i want to have divs in one div and they need to be in
I have two divs inside a container div. One need to float left the
I have some div's like <div class=block-wrap> <a href=#>A</a> <a href=#>A</a> <a href=#>A</a> <a
I'm developing a dashboard using ASP.NET MVC3 and need to have two divs which
I have 2 div's that I need consecutively toggled back and forth showing and
I have three divs, within a content div. Container width 70%. Within that I
I have two divs floated next to one another: <div id=parent> <div id=child_1 style=float:left>
I have multiple divs in a wrap, they have different height. I'd like to
I have two divs which I need to show the opposite upon click. You
I have two divs that I need to position horizontally dependent on the width

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.