Hi, I have added a js script to my site, and I don’t think it is working correctly - it works when tested in codepen.
Am I adding them it the correct place?
I am not using cornerstone to build my pages, but have used the “Pro” / theme options link in the top of the admin.
It opens the X Theme options window, and in the narrow left side bar, I have opened the JS tab at the bottom.
This is where I placed the script.
Are you able to take a look and tell me if I have added it correctly?
What I want to happen is when the user hovers their mouse over the thumbnail, the video plays on loop until the move the mouse off the thumbnail again.
// video thumbnail play on hover
var figure = $(".video").hover( hoverVideo, hideVideo );
function hoverVideo(e) {
$(‘video’, this).get(0).play();
}
function hideVideo(e) {
$(‘video’, this).get(0).pause();
}
When you respond I can give you the logins to the site to review what I have done.
Thanks