D
D
Dmitry Borisov2019-05-03 03:24:16
WordPress
Dmitry Borisov, 2019-05-03 03:24:16

How can I implement video loading in a Woocommerce product when hovering over a product?

Good day to all!
There is a catalog of goods, each product has a video.
Is it possible to make it so that when hovering the mouse over a product (hover) in the product catalog, the image of the product changes on the video from the same product?
There are plugins that display them only in the description, or in the product card, but I haven’t found anything else like this, how is it possible to implement this?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
W
WP Panda, 2019-05-03
@wppanda5

Ajax to the rescue, the task is completely trivial

S
Sergey Kotov, 2019-05-03
@liqrizz

plugin

O
Orkhan Hasanli, 2019-05-03
@azerphoenix

With a banal jQuery code, you catch the mouse hover event in the image thumbnail area.
Then, when hovering, send an ajax request to the server and take the link from the video
Replace the block with the thumbnail with the received video
Start playback...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question