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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:42:38+00:00 2026-05-29T12:42:38+00:00

I am trying to select a image inside a link. JQUERY: $(‘#selskaber img’).hover(function ()

  • 0

I am trying to select a image inside a link.

JQUERY:

$('#selskaber img').hover(function () {
    $(this).next().css({'border' : '1px solid #0167B0 !important'});
  }, 
  function () {
    $(this).next().css({'border' : '1px solid #CCCCCC !important'});
  }
);

HTML:

<div id="selskaber">
    <a target="_blank" href="#">
    <img style="border:none;" src="/images.pmg" alt="Telenor">
    </a>
</div>

UPDATE:

I have removed the next(). Still no border is added.

My CSS:

#wrap #selskaber a {border:none;margin-left:10px;display:inline-block !important;
    height: 41px;
    margin-top: 5px;
    width: 150px;}
  • 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-29T12:42:41+00:00Added an answer on May 29, 2026 at 12:42 pm

    That image doesn’t have any sibling, so next won’t give you anything.

    If you’re trying to select the img, just remove the next()

        $('#selskaber img').hover(function () {
        $(this).css({'border' : '1px solid #0167B0 !important'});
          }, 
          function () {
            $(this).css({'border' : '1px solid #CCCCCC !important'});
          }
        );
    

    next:

    Description: Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.

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

Sidebar

Related Questions

I am trying to select a <div> using jquery's $('#divname') inside a infobox that
alt text http://www.freeimagehosting.net/image.php?a55fa98f01.jpg Hi I am trying to use a HTML select box with
In trying to select elements that have any attributes, the following throws a jQuery
I want basically the same as jquery select image a row of images that
I've followed this tutorial and it works fine: http://www.dynamicdrive.com/style/csslibrary/item/css-popup-image-viewer/ However my problem is that
I have this code: $('a[rel=imagesHandler]').hover( function(){ //ia latimea var liWidth = $(this).width(); $(this).append('<div id=editBar><a
I am trying to allow a user to select an image, either from the
I'm trying to select 2 rows before and after a given primary key. This
I was trying to get this with divs and css, but I was advice
I am trying to retrieve the image url in from this html page 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.