Animated div positioned on top of an image map

My current project can be found at: (please note that the sounds will not autoplay in the future).

I am attempting to incorporate the sun effect from this codepen: https://codepen.io/Hackroro/pen/ByrKLZ

I have realized that in order for the sun to appear on the page, it needs to be added immediately after

<div class="mapify-holder">
. The challenge here is that mapify dynamically adds this class.

The following HTML code needs to be inserted after the

<div class="mapify-holder">
.

<div class="sun">
    <div class="ray_box">
        <div class="ray ray1"></div>
        <div class="ray ray2"></div>
        <div class="ray ray3"></div>
        <div class="ray ray4"></div>
        <div class="ray ray5"></div>
        <div class="ray ray6"></div>
        <div class="ray ray7"></div>
        <div class="ray ray8"></div>
        <div class="ray ray9"></div>
        <div class="ray ray10"></div>
    </div>
</div>

Below is the actual code of the page:

default:
            var htmlcode = '<img src="images/Intrare.jpg" usemap="#map" class="map full-img" width="1920px" height="1080px">';
            // More code...
            imgContainer.innerHTML = htmlcode
            break    
        }   

The <image> and the <area>s are included within a conditional as I require different image maps with distinct areas for various resolutions.

I attempted assigning a higher z-index to the "sun" div, but it does not display above the image. Any thoughts on how I can accomplish this?

Answer №1

rearrange the location of the sun div to be underneath the specified code

<div class="background-container">..</div>
<div class="sun">..</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

Leveraging TypeScript to share information between directives in AngularJS through asynchronous calls

Although I've found some scattered information on how to tackle this issue, I haven't been able to find a solid solution. In my AngularJS application, I have an asynchronous call that fetches data from a server and I need to store it in a variab ...

The Enum object in TypeScript has not been declared or defined

For my TypeScript application, I am utilizing WebPack to transpile and bundle the code. The final result is intended to be used in a pure JavaScript website. One of the components in my application is an enum defined as follows: export const enum ShapeTyp ...

What is the rationale behind axios adding the current URL to API requests in Laravel or React?

I am currently working on a project that involves Laravel, React, and Redux. The following code snippet is from a function called by a Redux Saga worker: function fetchItems() { return axios.get('/api/items').then(response => response.dat ...

Tips for implementing a hover effect on the background color of a Bootstrap navbar

I am having trouble changing the background color of links and social media icons when hovering over them. I've tried multiple solutions found through searching, but none seem to work for me. Could someone please assist me with this issue? Thank you! ...

Creating visually appealing layouts with CSS floats and divs while ensuring responsiveness

As I work on bringing my vision to life, I'm experimenting with a mix of floats and divs, along with using a responsive image for the background and text. There's quite a bit involved in this process. 1. To start off, check out this example with ...

Having trouble running Ajax with JavaScript on a Wamp server

Exploring the realm of ajax, I embarked on a journey guided by a YouTube tutorial to construct a basic food search application. The concept was simple - users would input the name of a food item, and if available, its name would be displayed below. On the ...

Assistance for Hypertext Transfer Protocol in Webkit

I've been researching how webkit enables web browsers to display web pages. It's great to know that my HTML, CSS, and JavaScript code will work on any device that supports webkit. But one question still remains - does webkit also have built-in su ...

Resizing an image within a div with automatic adjustment, centered and aligned to the bottom position

I'm really struggling to understand this concept and not making much progress. I have a background image that automatically scales to fit the window size. In front of it, I want to center an image fixed to the bottom of the page, while still being sca ...

"Dilemma with Displaying a 3-Digit Number in DaisyUI Using Next.Js Countdown Component

Hey there, I'm encountering an issue with the countdown component on my Next.js website using daisyUI. When the number of days exceeds 99, it's not rendering correctly as shown below: https://i.sstatic.net/cWR2tSEg.png https://i.sstatic.net/V0Iv ...

What is the best way to tally the elements of a JavaScript array and produce a desired output format

I have an array that looks like this: ["5763.34", "5500.00", "5541.67", "5541.67"] I am looking to count similar values in the array and produce an output as follows: (1 * 5763.34) + (1 * 5500.00) + (2 * 5541.67) Does anyone have any ideas on how to ac ...

How can I make the cssRenderer layer element transparent so that the webglRenderer layer is visible beneath it in Three.js?

A test is being conducted on a cssRenderer that is running a scene directly in front of a webglRender. This setup allows both to run together, creating the illusion of including html dom elements (div and text) in webgl. The goal is to make the textbox ba ...

Refresh the datatable automatically when a field is updated without the need for AJAX requests

I need assistance with sorting a datatable column that contains checkboxes. The issue I'm facing is that the sorting is not working due to me changing the value of the column. Since it's not generated via ajax and I can't use the reload() me ...

Utilizing D3.js v4 to showcase a JSON file on a map

I am attempting to create a map similar to the one created by Mike Bostock. You can access my JSON file (here), which represents Europe divided into NUTS 2 regions. The structure of the JSON file is as follows: { "type": "Topology", "objects": ...

The onbeforeunload event is activated in the parent page when it is specified in the child page

Seeking a way to activate the window.onbeforeunload method when a user attempts to refresh the browser, and display a message to prompt them to save their current work before leaving. I am currently working on an AngularJS application. Here is the URL of m ...

Videos playing simultaneously

Can we synchronize the video playback on two computers simultaneously? If there is buffering on one computer, the other must pause and wait. ...

Efficiently handling multiple JSON objects in a single PHP function

Currently, I am working on a project that involves populating two dropdown menus where the value of one depends on the other. Specifically, I have three dropdowns - one to select a class, and the other two for selecting subjects and exams based on the sele ...

CSS issue encountered: "Value of property is not valid"

When working with CSS, I encountered an error stating "Invalid Property Value" while inspecting the transform element of the Service section in the Wall Street theme. Could someone kindly assist me with the necessary steps to rectify this issue? https://i ...

Issue with Jquery .on() causing toggleClass function to not trigger

Adding a column dynamically to a table on click with JS/Jquery is achieved as demonstrated below $("#btn").click(function(){ $('#week_title').append('<th>Week '+count+'</th>'); count++; $('.tag&ap ...

How can I combine jQuery "this" along with a CSS selector?

Currently, I am working on a script that will allow me to toggle the visibility of a section within a div. I have three of these divs with hidden sections and I am trying to find a way to control all three using a single function. This is what my code loo ...

Difficulty in centering two equal-sized columns in a Bootstrap 3 row with an offset

Here is a link to my demonstration on JSFiddle: https://jsfiddle.net/nbd2w3zb/ I am working with Bootstrap 3 and have created 2 equal-sized columns (.col-md-4) within a .row. The desired effect is to center both of these columns inside the .row, ensuring ...