Need some help with JS.

I want the inside video will be hidden and when someone clicks the play button the video will appear and play and when someone close the button the video will be hidden.

Please help to achieve this.

  • Ash
    • WordPress Hacker

    Hello Liesl van Wyk

    Would you please try the following js code?

    ( function( $ ) {
    $( document ).ready( function() {
    setTimeout( function() {
    $( "#slide-14-layer-5" ).hide();
    $( "#rev_slider_10_1 .tp-videolayer" ).hide();
    }, 1000);
    $( "#slide-14-layer-6" ).on( 'click', function() {
    $( "#slide-14-layer-5" ).show();
    $( ".tp-videolayer" ).show();
    $( "#slide-14-layer-5" ).on ( 'click', function() {
    $( this ).hide();
    $( "#rev_slider_10_1 .tp-videolayer" ).hide();
    })( jQuery )

    Please let us know if that works. Have a nice day!


    • Liesl van Wyk
      • Flash Drive

      Hi Ash
      This is really weird. I did not ad any code - and it is working. Somewhere someone had to add some code but I can find it nowhere. I have to find it though as I need to still adapt the code a bit.
      Can you help me with this - I do not see the code either in the Slider Revolution for Nielsen-Vid-New or in the functions.php file of either the Infinitum Child Theme or the Main Theme.

      Need a solution.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.