• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Show hide this id?

Contributor ,
Apr 11, 2023 Apr 11, 2023

Copy link to clipboard

Copied

Hi,

 

I'm building my own subtitles/CC with JS, but something messes up.

 

When I spread the subtitle objects (smart shapes) along the time line, the code below cannot cope with objects that are not appearing on the moment the a self made subtitle on/off buton has been clicked. So how can I bypass the CP CSS visibility?

 

$('[id^="Subtitle"]').each(function( index ){
if($( this ).css('visibility') ==='visible')cp.hide(this.id)
else cp.show(this.id);
});

 

/Jacob

TOPICS
Advanced

Views

122

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

People's Champ , Apr 12, 2023 Apr 12, 2023

ccClose is the ID of the little X in the top right of the CC, I hide it so my toggle action works.

The background color of the CC is set in a div with the id "ccText"

Scaling doesn't have any effect

 

Votes

Translate

Translate
People's Champ ,
Apr 11, 2023 Apr 11, 2023

Copy link to clipboard

Copied

The issue I am having is it throwing a isInRange is not a function error when the button is pressed a second time. Why are you using your own CC? You could always use the built in CC and move it if that's what you are trying to accomplish.

 

var cc = document.getElementById( 'cc' )
cc.style.width = '1160px';
cc.style.left = "10px";
cc.style.top = "606px";
cc.style.padding = "0px 10px 0px 10px";
document.getElementById("ccClose").style.display = "none";

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 11, 2023 Apr 11, 2023

Copy link to clipboard

Copied

Thanks.

The idea of creating my own subtitles has been to be able to create a semi-transparent background bar (black) and white font as desired.

 

But what is that with ccClose ID? And where to customize the styling for the entire project? And what if I'm exporting as a scalable project?

 

/Jacob

 

 

Kind regards,

Jacob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Apr 12, 2023 Apr 12, 2023

Copy link to clipboard

Copied

LATEST

ccClose is the ID of the little X in the top right of the CC, I hide it so my toggle action works.

The background color of the CC is set in a div with the id "ccText"

Scaling doesn't have any effect

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources