Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #606870

    I’d like to create a grid of “images” that play mini video clips when hovered over… any ideas on how to go about that with the current features you offer? Or maybe I need to install something additionally?

    #606871
    #607153

    Hi,

    There is nothing like that in the theme by default but you could try implementing that code on a page to see if it works out for you?

    Thanks,
    Rikard

    #607651

    Thanks! It doesn’t work for me, I think it’s because I can’t add figure out where to add the Java… does the theme allow me to add me own somehow?

    #607665

    Hey!

    Implementing this will this is a bit more complicated than copy pasting this code let’s see what best we can do for you…

    Add the js code in the below code and finally paste it in the functions.php

    // Video on hover
    function playon_hover(){
    ?>
    <script>
    
    // ADD YOUR CUSTOM SCRIPT HERE
    
    </script>
    <?php
    }
    add_action('wp_footer', 'playon_hover');

    Please note that the class names and path int he js code should match your site.

    Then use Codeblock element to add your images with video…

    Best regards,
    Vinay

    #607668

    Hi!

    Please add following code to Functions.php file in Appearance > Editor

    function custom_video_preview(){
    ?>
     <script>
    var figure = jQuery(".video").hover( hoverVideo, hideVideo );
    
    function hoverVideo(e) {  
        jQuery('video', this).get(0).play(); 
    }
    
    function hideVideo(e) {
        jQuery('video', this).get(0).pause(); 
    }
     </script>
    <?php
    }
    add_action('wp_footer', 'custom_video_preview');

    then add your custom CSS code into Quick CSS field and you can add your HTML code in text tab of Text Block element or into Code Block element

    Best regards,
    Yigit

    #619256

    Still no luck…

    http://goliathgauntlet.com/video-test/

    • This reply was modified 8 years, 7 months ago by KelseyCurran.
    #619262

    AGH! It’s working now! No idea what changed… THANK YOU!!!!

    #621066

    Hi,

    Sorry for the late reply, glad you got it working. Please let us know if you should need any more help on the topic.

    Thanks,
    Rikard

    #692956

    Is this possible with just the code in this thread? This seems pretty damn cool.

    @Kelsey, I love the site!

    #693027

    Hi,

    Thank you for the kind words. did you try the code?

    let us know if you have any issue.

    Best regards,
    Vinay

    #1052911

    Hello,
    I did not succeed … Can you help me?
    Is there another method?
    Thanks

    #1053567

    Hi,

    This might help:

    // https://kriesi.at/support/topic/video-on-hover-for-portfolio-items/

    Best regards,
    Ismael

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.