Javascript Image Slider / Posts /

How to hide the caption when I play the video in the slider?

38
When I play the video in the slider, the caption is also visible...  Is there a way on how to not display it on the slider when video is being played..  Thanks

Jay  12 years ago   viewed: 14365    

8 Answers

8

Please ignore all the answers in other posts.

Today the mcVideoPlugin.js was updated, and the PLAY-and-HIDE becomes a built-in feature. You can enable the feature simply by configuring the options. In the new mcVideoPlugin.js, you will find the options at the top of the mcVideoPlugin.js file:

var McvOptions = { showCaptionWhenPlay: false, showCaptionWhenPause: true };

You can set their values to either true or false.

Milo   10 years ago
1
Hello.. can someone from the admin help me with this problem please?,.  I appreciate any idea.. thanks
Jay   12 years ago
4
In that case, you can try adding the following script to your page:
The following example is for the 3rd slide's caption. If you think the caption is gone too soon, change the hideCaption(); with: setTimeout(hideCaption, 3000);

        function hideCaption() {
            var divs = document.getElementById("slider").getElementsByTagName("div");
            for(var d=0; d<divs.length; d++) {
                 if(divs[d].className=="mc-caption-bg" || divs[d].className=="mc-caption-bg2")
             divs[d].style.visibility = "hidden";
            }
        }

        function afterSlideChange(args) {
            //args: [0]-currentSlide index, [1]-currentImage
            if(args[0]==2) { //say if you want to hide the 3rd slide's caption
                  hideCaption();
            }
        }

 Jay, please post if it works. I didn't test it.

Milo   12 years ago
0
Thanks Milo.. I'll try this right now and will let you know right away if it works..  :)
Jay   12 years ago
1
Yes!!,. the codes worked Milo..... Many thanks to you.. :)
Jay   12 years ago
3
This doesn't work anymore, or maybe it never worked. The caption goes away anytime the slide is changed. not specifically when the video is played. So if the slide changes from the 1st to the 2nd, the caption for the 2nd slide appears then instantly goes away
Mohammad   11 years ago
1
I should mention I'd like a working answer please :). pretty please
Mohammad   11 years ago
1
Mohammad,
Did you follow my instructions marked as "answer"? 
Note: 
1. If you followed the steps and it doesn't work, would you stage a testing page online?
2. The afterSlideChange function in only available for licensed slider;
Milo   11 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: