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

Is it possible to add and remove class names in ANCC canvas

LEGEND ,
Jul 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

Is it possible to add and remove class names to symbols' instances since we are using JavaScript and Jquery?

I am thinking of senari where I need tracking questions done or not done, etc... Sometimes I accomplish that with variables but sometimes I prefer a class.

Views

421

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

Community Expert , Jul 27, 2018 Jul 27, 2018

you should be able to add a className:

this.mc.className='correct_class';

because of timing issues (you'll need to add jquery before using addClass() ) i'm not sure addClass() will work that way you want.

Votes

Translate

Translate
Community Expert ,
Jul 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

you should be able to add a className:

this.mc.className='correct_class';

because of timing issues (you'll need to add jquery before using addClass() ) i'm not sure addClass() will work that way you want.

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
LEGEND ,
Jul 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

Thank you for your answer.   I guess I will have to experiment.

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
LEGEND ,
Jul 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

If you're talking about the HTML DOM attribute class (intended for CSS formatting and element selection), that only exists on HTML DOM objects. It does not exist on canvas stage objects. The only DOM objects Animate creates automatically are the jQuery UI widgets.

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
LEGEND ,
Jul 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

LATEST

Interesting. Thanks for your input.

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