Site logo

Archived topic

How can I add custom js?

3 replies · Started by Ricardo on September 19, 2020

Viewing posts 1–4 of 4

Hi,

I am using wp video player, but I want to customize it.

I wonder if you could help me with that.

I would like to change the js of the video like this:

var video = document.getElementById("wp_mep_1");

$(video).on({
mouseenter: function () {
video.setAttribute("controls","controls")
},
mouseleave: function () {
video.removeAttribute("controls");
}
});

How can I create an id to the video player element and conect it to this?

Thanks!

Hi there,

Are you referring to the video player from WordPress core?

If so you will need to check with WordPress support on this.

Yes!

I understand. I thought that I needed to use elements to do that.

I'll contact them.

Regards,
Ricardo

Let's see what they say first.

You might be able to use the element to add the code.

This archived topic is closed to new replies.