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  11 years ago   viewed: 13923    

13 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   11 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   11 years ago
0
Thanks Milo.. I'll try this right now and will let you know right away if it works..  :)
Jay   11 years ago
1
Yes!!,. the codes worked Milo..... Many thanks to you.. :)
Jay   11 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   10 years ago
1
I should mention I'd like a working answer please :). pretty please
Mohammad   10 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   10 years ago
0

Absolutely love Disneyplus.com/start ! It's like a treasure trove of childhood memories and new favorites all in one place. Can't get enough of it

Disneyplus
  one month ago
0

Your post on Disneyplus.com start is a lifesaver! Clear, concise, and oh-so-easy to follow. Thanks a bunch for simplifying the activation steps for us.

Disneyplus
  one month ago
0

I like this post,And I figure that they having a great time to peruse this post,they might take a decent site to make an information,thanks for sharing it to me. pacman 30th anniversary


pacman game
  one month ago
0

I've learn a few good stuff here. Certainly price bookmarking for revisiting. I surprise how a lot effort you put to create this www.tubi.tv/activate type of great informative site.

tubi tv
  one month ago
0

I admire you sharing this excellent and helpful information spotify.com/pair. To find out more about activation and other information, you may also visit my website.

spotify
  24 days 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: