Issues with image mapping functionality

When working with image mapping, I encountered an issue where changing the width and height of the image caused some drawing issues. Specifically, when hovering over certain circles that were drawn on the image, hover-content1 was supposed to appear.

After struggling with image mapping, I attempted using CSS and jQuery to achieve the desired effect by toggling the opacity of hover-content1 between 0 and 1 on hover and mouseout events. However, this approach also did not yield the desired result.

Can anyone provide suggestions on how to achieve this effect using CSS or jQuery?

/* CSS code snippet */
.headset-image{
width: 100%;
margin: 0 auto;
padding: 200px;
}
.headset-image img {
position: relative;
width: 50%;
height: auto;
}
.hover-wrapper {
/* position: relative; */
}
.hover-wrapper .hover-content1,
.hover-wrapper .hover-content2,
.hover-wrapper .hover-content3,
.hover-wrapper .hover-content4 {
    display: flex;
    width: 10%;
    flex-direction: column;
    text-align: justify;
}
h4.hover-head-content {
    margin: 0;
    padding: 2px 4px 5px;
    font-size: 10px;
    font-weight: bold;
}
p.hover-para-content {
    margin: 0;
    padding: 4px;
    font-size: 12px;
    line-height: 1.40;
}
.hover-content1 {
    position: absolute;
    top: 15%;
    left: 13%;
    padding: 5px;
    opacity: 1;
    color: #ffffff;
    background: rgba(0,0,0,0.5);
}
... /* additional CSS rules */
<!-- HTML markup -->

<div class="section-image">

<div class="headset-image">
<img src="https://preview.ibb.co/iVKhMm/headset.jpg" class="headphone" alt="">
</div>

<!-- hover-effect-1 -->
<div class="hover-wrapper">
<div class="loading-content1">
<div class="loading-circles">
<div class="circle hold"></div>
<div class="circle first"></div>
<div class="circle"></div>
</div>
</div>

<div class="hover-content1">
<h4 class="hover-head-content">ACOUSTIC NOISE CANCELLING</h4>
<p class="hover-para-content">
More than 40 years of noise-cancelling obsession makes quiet sound quieter and music sound better.
</p>
</div>
</div>

... <!-- repeat for other hover effects -->
</div>
</div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Tips for achieving a seamless appearance with box-shadow on the left and right sides of various elements

.row { height: 300px; width: 300px; margin: 0 auto; box-shadow: 0 -20px 0px 0px white, 0 20px 0px 0px white, 12px 0 30px -4px rgba(0, 0, 0, 0.3), -12px 0 30px -4px rgba(0, 0, 0, 0.3); } <div class="row"></div> <div class="row">< ...

Ajax - Every single request has been successfully fulfilled

I am struggling to determine when all my Ajax requests are finished in order to call another function. I have attempted to use various methods with native Ajax functions in Chrome, but none of them seem to be working for me. Can someone please help me? H ...

What is the best way to implement a 'box-shadow-right' that stops at the border?

How can I achieve a seamless shadow effect at the border-right of a small div that matches the shadow of a larger div, without cutting off at the border-bottom of the small div or the border-top of the large div? I am unable to use Z-index due to the compl ...

Combining an HTML file, a D3.js script file, and manually inputting data in the HTML file

I am relatively new to d3.js and currently working on building a simple application. However, I have encountered a roadblock in my progress. I have a separate JavaScript file named jack.js which generates a pie chart when linked with an HTML page. The Iss ...

Aligning content in CSS for cross-browser compatibility with Internet Explorer and Chrome

My CSS grid has grid items that can easily be centered in Chrome by using the justify-items:center property, creating a magical effect. However, this solution does not work in Internet Explorer as the items remain stuck to the left side. For reference: ht ...

Placing two images next to each other with accompanying captions

Currently working on developing a webpage, I am aiming to have two images in each row with captions positioned beneath them. The images are already configured as follows, I just require the captions: <div class = "container"> <img class = "pi ...

Determine if the same origin policy is in effect

Is there a method to determine if the same origin policy is applicable to a URL before attempting to use ajax methods? Below is an example of what I currently have: function testSameOrigin(url) { var loc = window.location, a = document.create ...

Leveraging the power of AJAX and jQuery to enhance search functionality and retrieve URL parameters

Today is one of those days where my brain feels fried and I'm struggling to work this out. I'm attempting to create an input field for a search engine that connects to my MySQL database using Ajax. My goal is to send parameters through Ajax, then ...

What is the best way to retrieve an <a> tag element using Selenium in Python?

I am fairly new to using Selenium and could use some guidance with the following issue. I am attempting to create a birthday bot for Facebook, but navigating through the platform's latest UI has been challenging with JavaScript disabled. I've bee ...

Include a triangle shape at the top of a div container that has a background image using CSS

Struggling to add a point or triangle shape to my div with a background image, finding it difficult to create enough open space. This is the desired outcome: https://i.sstatic.net/LZVaF.png This is what I have implemented so far: <div class="bg"> ...

Using Javascript to swap out elements sharing the same classname with distinct contents

Just a quick question: Can you replace the values of elements with the SAME class with different values? For example, let's say I have this array returned by an AJAX response: [ "$63.00 / Night", "$68.00 / Night", "$58.00 / Night", "$50.00 / ...

Guide on using bootstrap collapse feature with two buttons sharing the same data-target, ensuring that the collapsible element does not collapse if it is already

I have successfully implemented two buttons that collapse and show the same card. However, I am now seeking a solution to prevent the card from collapsing if it is already shown by one button. When the card is visible, both buttons should be able to show ...

The jQuery function appears to be running multiple times in a loop

For some reason, every value in my JSON object is getting added to the "listOfCountries" array twice. It seems like there might be a loop going through the result object more than once. I could really use some assistance with this issue! var listOfCountri ...

Having trouble getting event modifiers to work in Vue when added programmatically

Trying to dynamically add events using v-on through passing an object with event names as keys and handlers as values. It appears that this method does not support or recognize event modifiers such as: v-on=“{‘keydown.enter.prevent’: handler}” T ...

leveraging parcel for importing typescript dependencies

I am currently using parcel to process typescript for a web extension. I have installed JQuery and its type definitions via npm. In my typescript file, I have the following at the top: import $ from "jquery"; import "bootstrap"; However, when running run ...

Issue with JQuery causing maxlength input not to work

Is there a way to use JQuery to set the maxlength attribute for an input[type='text'] while users are typing, so that once the max value is reached, input will stop? This is the code I have been trying: $(document).ready(function(){ $(&apos ...

Create a nested table with a table-layout set to auto and a width of 100%, allowing for overflow when the window

How can I achieve a table with table-layout: auto and a 100% width that overflows horizontally when the window is too narrow without showing a scrollbar? Consider these examples: WORKING EXAMPLE 1 <div style="width: 100%; overflow-x: auto"> &l ...

Maintain dropdown menu visibility while navigating

I'm having an issue with my dropdown menu. It keeps sliding up when I try to navigate under the sub menu. I've spent all day trying to fix it, testing out various examples from the internet but so far, no luck. Any help would be greatly apprecia ...

Moving a row from one Jquery Datatable to another table

I'd like to merge the rows from table 2 into table 1. If I check a row in the checkbox column and click on "add user," that row will be added to table 1. Next to the "add user" button, there is an option to select all or none. If I click on "select ...

Next.js file communication issue with data transfer

There are three files here: project.js import Image from 'next/image'; import Link from 'next/link' import { DATA } from '../../components/Data' const WEB_RELATED = [] const PC_EXES = [] for(let i=0;i<DATA.length; i++){ ...