I have a working grid, with images and links, so when you click the image, it takes you to the link.
Here is the working Axios code. (Working means this const is part of the other code):
const grid_display = ({ url, key }) =>
React.createElement("div", { className: "image-item", key: key },
React.createElement("a", { href: "https://www.example.com"},
React.createElement("img", { className: "grid-img", src: url })));
So I need to add to that code, the following:
- A mouseover / hover event
- Play a mp4 file (basically a link to a sound), via script function
- Keep same code, but just ADD the playing of sound
- NOTE: this code is all dynamic: all images, links, sounds are passed into this script from a database.
- Can't use any type of extra plugin .
- I'm looking to just add the correct line or syntax so the React.createElement statement works/adds the mouseover event or hover event.
As far as how the sound is played... any way that is fast, simple, uses minimal resources, etc. I'm thinking the sound clips will only be 5 seconds, 10 at max.
So, the better issue I'm having is, how do you put this solution...
...in the React.createElement statements above?